Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/time/

time_parse.pro


FUNCTION: time_parse PURPOSE: Parse a string or array of strings into double precision seconds since 1970 (a)using user provided format code or (b)using flexible formatting and no code INPUTS: s : the input string or array of strings KEYWORDS: tformat=tformat: Format string such as "YYYY-MM-DD/hh:mm:ss" (Default) the following tokens are recognized: YYYY - 4 digit year yy - 2 digit year (00-69 assumed to be 2000-2069, 70-99 assumed to be 1970-1999) MM - 2 digit month DD - 2 digit date hh - 2 digit hour mm - 2 digit minute ss - 2 digit seconds .fff - fractional seconds (can be repeated, e.g. .f,.ff,.fff,.ffff, etc... are all acceptable codes) MTH - 3 character month DOY - 3 character Day of Year TDIFF - 5 character, +hhmm or -hhmm different from UTC (sign required) tformat is case sensitive! tdiff=tdiff: Offset in hours. Array or scalar acceptable. If your input times are not UTC and offset is not specified in the time string itself, use this keyword. MMDDYYYY=MMDDYYYY: handle dates in month/day/year format flexibly if tformat not specified Examples: NOTES: #1 Some format combinations can conflict and may lead to unpredictable behavior. (e.g. "YYYY-MM-MTH") #2 Primarily intended as a helper routine for time_double and time_struct #3 letter codes are case insensitive. #4 Based heavily on str2time by Davin Larson. $LastChangedBy: davin-mac $ $LastChangedDate: 2014-04-29 20:06:36 -0700 (Tue, 29 Apr 2014) $ $LastChangedRevision: 14975 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/time/time_parse.pro $

Routines

top source time_parse

result = time_parse(s, tformat=tformat, tdiff=tdiff, MMDDYYYY=MMDDYYYY)

Parameters

s

Keywords

tformat
tdiff
MMDDYYYY

File attributes

Modification date: Wed Apr 30 20:46:57 2014
Lines: 99