Created
April 18, 2018 02:16
-
-
Save sh78/5c0864a0d4438cc31d2a3ce6a7228fed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set theDate to current date | |
=> date object | |
set theDate to current date as string | |
=> Thursday, December 03, 2015 at 09:57:25 | |
set theDate to current date | |
set y to rich text -4 thru -1 of ("0000" & (year of theDate)) | |
set m to rich text -2 thru -1 of ("00" & ((month of theDate) as integer)) | |
set t to rich text -2 thru -1 of ("00" & (day of theDate)) | |
set theNiceDate to y & "-" & m & "-" & d | |
# theNiceDate === "2015-12-03" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment