>  Docs Center  >  Libraries  >  Motley  >  MGH_DT_PARSE

MGH_DT_PARSE

MGH_DT_PARSE

Name


  MGH_DT_PARSE

Purpose


  This procedure extracts date & time information from a string in
  extended ISO 8601 format.

Calling Sequence


  Result = mgh_dt_parse(Iso)

Positional Parameters


  Iso (input)
    A string scalar in ISO 8601 format

Outputs


  The function returns a structure with one or more of the following
  tags:
    YEAR (integer)
      Year number
    MONTH (byte)
      Month number
    DAY (byte)
      Day of month
    HOUR (byte)
      Hour of day
    MINUTE (byte)
      Minute
    SECOND (float)
      Second
    ZONE (float)
      Time zone in hours

Restrictions


  - Years before 0 AD are not allowed (because minus signs are
    interpreted as date separators).
###########################################################################
  Copyright (c) 1999-2015 NIWA:
  http://www.niwa.co.nz/
  Licensed under the MIT open source license:
  http://www.opensource.org/licenses/mit-license.php
###########################################################################

Modification History


  Mark Hadfield, 1999-08:
    Written as MGHDT_PARSE_ISO, based on routine STR2UTC in the CDS
    library (http://sohowww.nascom.nasa.gov/solarsoft/gen/idl/).
  Mark Hadfield, 2000-08:
    Copied (with no substantive changes in the code) into my new
    date-time library as MGH_DT_PARSE.
  Mark Hadfield, 2001-05:
    Converted from a procedure returning data via keyword
    arguments to a function returning a structure. Moved the
    source file into my Motley library.
  Mark Hadfield, 2001-10:
    The result, which is a structure, no longer has the dummy tag
    (name "dummy") which was included to simplify the
    structure-building code.
  Mark Hadfield, 2011-07:
    The output if no date-time strings are found
    is now an empty structure and the code has been simplified somewhat to take
    advantage of this.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us