• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript can't tell time?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript can't tell time?


  • Subject: Re: Applescript can't tell time?
  • From: Doug McNutt <email@hidden>
  • Date: Tue, 3 Feb 2004 10:54:58 -0700

It looks to me as though you're comparing two text strings and the AM/PM is not even being considered because the comparison stops with the first character.

24 hour clock?
Convert to epoch seconds?

Both are probably impossible in AppleScript.

At 10:01 -0700 2/3/04, Robert Poland wrote:
>set nowDate to (current date)
>set nowTime to "" & time string of (nowDate)
>set bedTime to "8:59.00 PM" as text --> "8:59.00 PM"
>set nowTime to nowTime as text --> "9:57:26 AM"
>if (nowTime is less than bedTime) then
> set x to 1
>else
> set x to 2
>end if
>x --> 2

--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Applescript can't tell time? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Applescript can't tell time?
  • Next by Date: Re: Multiline commands in do shell script
  • Previous by thread: Re: Applescript can't tell time?
  • Next by thread: Re: Applescript can't tell time?
  • Index(es):
    • Date
    • Thread