Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
set x to "March 7 2009 7:30pm EST"
|
||||
return (date x) + 12 * hours
|
||||
|
|
@ -0,0 +1 @@
|
|||
date "Sunday, March 8, 2009 7:30:00 AM"
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
use AppleScript version "2.4" -- OS X 10.10 (Yosemite) or later
|
||||
use framework "Foundation"
|
||||
|
||||
on dateManipulationTask()
|
||||
set dateString to "March 7 2009 7:30pm EST"
|
||||
|
||||
set dateFormatter to current application's class "NSDateFormatter"'s new()
|
||||
tell dateFormatter to setDateFormat:("MMMM d yyyy h:mma z")
|
||||
tell dateFormatter to setAMSymbol:("am")
|
||||
tell dateFormatter to setPMSymbol:("pm")
|
||||
set USLocale to current application's class "NSLocale"'s localeWithLocaleIdentifier:("en_US")
|
||||
tell dateFormatter to setLocale:(USLocale)
|
||||
set timeZone to current application's class "NSTimeZone"'s timeZoneWithAbbreviation:(last word of dateString)
|
||||
tell dateFormatter to setTimeZone:(timeZone)
|
||||
|
||||
set inputDate to dateFormatter's dateFromString:(dateString)
|
||||
set newDate to current application's class "NSDate"'s dateWithTimeInterval:(12 * hours) sinceDate:(inputDate)
|
||||
|
||||
return (dateFormatter's stringFromDate:(newDate)) as text
|
||||
end dateManipulationTask
|
||||
|
||||
dateManipulationTask()
|
||||
Loading…
Add table
Add a link
Reference in a new issue