• 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: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sun, 6 Sep 2009 16:10:01 -0400

And how do you detect that? The point is, the date locale setting that
matters is the one at runtime, not compile time. So any function that
dynamically builds and parses a date string has to deal with all the
possible locale settings on all the systems where the script is
ultimately run.  No big deal if you're the only one who runs the
scripts you write, but otherwise...


On 9/6/09, Doug Tallman <email@hidden> wrote:
> Of course, if the system is dd/mm/yyyy the function would be:
>
> on newDate (d,m,y)
>
> ::)
>
> My point was to avoid the issue with Sept. 29 and February.
> Alternatively one could:
>
> on newDate(m, d, y)
> 	set new_date to date "01/01/01"
> 	set month of new_date to m
> 	set day of new_date to d
> 	set year of new_date to y
> 	return new_date
> end newDate
>
> newDate(12, 25, 1973)
>
>
>
> On Sep 6, 2009, at 1:34 PM, Yvan KOENIG wrote:
>
>>
>> Le 6 sept. 2009 à 19:28:21, Doug Tallman a écrit :
>>
>>> on newDate(m, d, y)
>>> 	set new_date to date ((m as string) & ¬
>>> 		"/" & (d as string) & "/" & (y as string))
>>> 	return new_date
>>> end newDate
>>>
>>> newDate(12, 25, 1973)
>>>
>>
>>
>> Which valid only for systems using mm/dd/yyyy date format.
>>
>> If the system uses dd/mm/yyyy date format it must be edited as:
>>
>>
>>> on newDate( d, m, y)
>>> 	set new_date to date ((m as string) & ¬
>>> 		"/" & (d as string) & "/" & (y as string))
>>> 	return new_date
>>> end newDate
>>>
>>> newDate(12, 25, 1973)
>>
>> Yvan KOENIG (VALLAURIS, France) dimanche 6 septembre 2009 19:34:16
>>
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list      (applescript-
>> email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden
>
>

--
Sent from my mobile device

Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: Yvan KOENIG <email@hidden>
    • Re: date/Snow Leopard changed
      • From: Doug Tallman <email@hidden>
References: 
 >Re: date/Snow Leopard changed (From: Doug Tallman <email@hidden>)
 >Re: date/Snow Leopard changed (From: LuKreme <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: Deivy Marck Petrescu <email@hidden>)
 >Re: date/Snow Leopard changed (From: Doug Tallman <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)
 >Re: date/Snow Leopard changed (From: Doug Tallman <email@hidden>)

  • Prev by Date: Re: new (I think) time question
  • Next by Date: Re: new (I think) time question
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread