• 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: My script won't be running stably
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My script won't be running stably


  • Subject: Re: My script won't be running stably
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 23 Mar 2017 13:17:19 +0100

It would be fine to replace :

set locale_Date to date requested_date
set short_date to short date string of result
set time_string to time string of locale_Date
set Unix_day to text 1 thru 2 of short_date
set Unix_month to text 4 thru 5 of short_date
set Unix_year to text 7 thru 8 of short_date


by


set locale_Date to date requested_date
set timeSring to time string of locale_Date
set Unix_day to text -2 thru -1 of ((100 + (day of locale_Date)) as string)
set Unix_month to text -2 thru -1 of ((100 + (month of locale_Date)) as string)
set Unix_year to text -2 thru -1 of (year of locale_Date as string)

This way your code will not be dependent of the local settings.


Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 23 mars 2017 13:17:15



 _______________________________________________
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

References: 
 >My script won't be running stably (From: ILJA SHEBALIN <email@hidden>)
 >Re: My script won't be running stably (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: path of a Finder item
  • Next by Date: Thoughts on Workflow acquisition?
  • Previous by thread: Re: My script won't be running stably
  • Next by thread: Re: My script won't be running stably
  • Index(es):
    • Date
    • Thread