Unsupported content

 

This version of the product is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

time.parseUTC

time.parseUTC(string)


Takes a UTC time string and converts it into an internal datetime object. It is not adjusted for time zones or daylight saving time.


A wide range of date formats are supported including:

European formats

  • dd.mm.yyyy
  • dd/mm/yyyy
  • dd-mm-yyyy

US formats

  • mm/dd/yyyy
  • mm-dd-yyyy

ISO formats

  • yyyy/mm/dd
  • yyyy-mm-dd
  • yyyymmdd

Literal formats

  • day, month, year
  • month, day, year


Additionally, the following formats are supported and they are tried in order to find the first match:

FormatDescription
dmy1European date parser (dd.mm.yyyy)
ymd3US style ISO date parser (yyyy/mm/dd)
mdy1US date parser (mm/dd/yyyy)
mdy2Alternative US date parser (mm-dd-yyyy)
ymd1ISO date parser (yyyy-mm-dd)
ymd2Alternative ISO date parser (yyyymmdd)
dmy2Alternative European date parser 1 (dd/mm/yyyy)
dmy3Alternative European date parser 2 (dd-mm-yyyy)
lit1Literal date parser (day, month order)
lit2Alternative literal date parser (month, day order)
unknownNo date part was found, defaultdate was used

If the passed date string cannot be parsed, time.parseUTC simply returns the the current date.

Was this page helpful? Yes No Submitting... Thank you

Comments