On this Page

    loc.currentTime

    Format the current time

    Syntax

    loc.currentTime([style[, timezone]])

    Parameters

    style is the style to format the time string. Possible styles are:

    StyleDescription
    ShortDefault style. The most terse form, as in "1:59 PM"
    Medium"1:59:26 PM"
    Long"1:59:26 PM GMT-05:00"
    Full"1:59:26 PM GMT-05:00"

    timezone, if present, indicates which international time zone to get the current time for. Time zones are specified by a string of the form "GMT+08:00" or "Australia/Perth" or "EST". If omitted, the time zone of the computer on which it is running will be used.

    Returned Value

    A formatted time string.

    Description

    Return the current time formatted for the language and country of the locale object loc. style indicates the display format. The style variants may not all be unique for some locales.

    See Also

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