On this Page

    loc.parseDate

    Converts date string to numeric date.

    Syntax

    loc.parseDate(datestring[, style])

    Parameters

    datestring is a formatted date such as "March 29, 2013".

    style is the style of this date string. Possible styles are:

    ShortDefault style. The most terse form, as in "3/2/09"
    Medium"Mar 2, 2009"
    Long"March 2, 2009"
    Full"Friday, March 2, 2009"

    See different local patterns here. For instance, "Date.3" pattern means Short style.

    Returned Value

    A numeric value that represents the date. This value can be used in loc.formatDate to re-format to a different locale.

    Description

    The returned date value can be used as an argument for formatDate() to re-format the date using a different locale or formatting style. Note that to be parsed correctly the datestring must be in the format specified by the style parameter (default is Short).

    See Also

    _locale (Format Currency, Number, Date/Time)
    loc.formatDate