Previous | Index | Next |
String manipulation methods
stringsFromDates:format:
Supply the format string you wish to use to convert the dates to strings. For example: "yyyy-MM-dd". The dates can be AS dates or NSDates.
See http:/unicode.org/reports/tr35/tr35-31.html#Date_Format_Patterns for format rules.
+ (NSArray *)stringsFromDates:(NSArray *)arrayOfStrings format:(NSString *)formatString
arrayOfStrings = date strings to convert
formatString = format string to use
Version 1.0.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set theDates to {current date, (current date) + 30 * days}
set theResult to current application's SMSForder's stringsFromDates:theDates |format|:"yyyy.MM.dd HH.mm.ss"
ASify from theResult
--> {"2015.11.20 18.17.02", "2015.12.20 18.17.02"}
theResult as list
--> {"2015.11.20 18.17.02", "2015.12.20 18.17.02"}