Documentation for /home/davin/idl/socware/

Generated by IDLdoc

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

general/misc/time/

time_struct.pro


Routines

top source time_struct

result = time_struct(time, epoch=epoch, no_clean=no_clean, MMDDYYYY=MMDDYYYY, timezone=timezone, local_time=local_time, is_local_time=is_local_time, tformat=tformat, tdiff=tdiff)

FUNCTION: time_struct(time) NAME: time_struct PURPOSE: A fast, vectorized routine that returns a time structure. INPUT: input can be any of the following types: double(s) seconds since 1970 string(s) format: YYYY-MM-DD/hh:mm:ss structure(s) similar to format below. OUTPUT: structure with the following format: ** Structure TIME_STRUCT, 11 tags, length=40: YEAR INT 1970 ; year (0-14699) MONTH INT 1 ; month (1-12) DATE INT 1 ; date (1-31) HOUR INT 0 ; hours (0-23) MIN INT 0 ; minutes (0-59) SEC INT 0 ; seconds (0-59) FSEC DOUBLE 0.0000000 ; fractional seconds (0-.999999) DAYNUM LONG 719162 ; days since 0 AD (subject to change) DOY INT 0 ; day of year (1-366) DOW INT 3 ; day of week (subject to change) SOD DOUBLE 0.0000000 ; seconds of day DST = INT = 0 ; Daylight saving time flag TZONE = INT = 0 ; Timezone (Pacific time is -8) TDIFF = INT = 0 ; Hours from UTC KEYWORDS: TFORMAT: Specify a custom format for string to struct conversion: 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! See Also: "time_double", "time_string", "time_epoch", "time_pb5", "time_zone_offset","time_parse" NOTE: This routine works on vectors and is designed to be fast. Output will have the same dimensions as the input CREATED BY: Davin Larson Oct 1996 $LastChangedBy: pcruce $ $LastChangedDate: 2014-02-25 15:54:20 -0800 (Tue, 25 Feb 2014) $ $LastChangedRevision: 14441 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/time/time_struct.pro $

Parameters

time

Keywords

epoch
no_clean
MMDDYYYY
timezone
local_time
is_local_time
tformat
tdiff

File attributes

Modification date: Thu Mar 13 16:35:40 2014
Lines: 74