parseTimeFromPattern()
The parseTimeFromPattern() function parses the timeDate string according to the time/date parser object in the compiledFormat parameter. This function returns the result as a float of seconds since the epoch.
Usage
float parseTimeFromPattern(chunk compiledFormat, string timeDate)
Usage description
compiledFormat | |
timeDate | String that represents a time and/or a date. |
For more information about the return value, see the description of
Time Format plug-in parse functions. For an example of how to use
parseTimeFromPattern(), see
Time Format plug-in compile pattern functions.
Note that the following are equivalent:
parse(format, timeDate)
parseTime (format, timeDate)
parseTimeFromPattern(compilePattern(format), timeDate)
Patterns with textual elements operate by default in English, but will instead both produce output and expect input in another language if that has been set in the environment. For example, under Linux, if the correlator is running with the LC_ALL environment variable set to "fr_FR", the format "EEEE dd MMMM yyyy G" produces and expects "jeudi 01 janvier 1970 ap. J.-C." for time 0.0.