Class: DateTimeFormat

barejs/polyfill/Intl.DateTimeFormat()

new DateTimeFormat()

Provides Date/Time formatting

Source:

Extends

Classes

DateTimeFormatOptions

Members

format

Format a value

Overrides:
Source:

Methods

resolvedOptions() → {Object}

Get the resolvedOptions

Inherited From:
Source:
Returns:

The options

Type
Object

(inner) formatDateTime(_date, _formatString, _utc) → {String}

Supports NUMERICAL formatting of dates, according to the formatting patterns described on http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns Warning: does NOT support formats like MMMM which should be localized. This method should only be used to produce a fixed date format. It also doesn't support identifiers that require knowledge of a specific calendar system, like "day of the week" or "era".

Parameters:
Name Type Description
_date Date

The date to format

_formatString String

The formatString to use.

_utc Boolean

Optional: set to true to use the UTC time zone instead of local.

Source:
Returns:

_date formatted as String using _pattern.

Type
String