DateFormatters

PatternDate

Specifications

Registered name

pattern-date

Properties

  • pattern (string) : format in which dates will be formatted and format that will be expected when parsing dates. The default pattern is the ISO-8601 format (yy-mm-dd). Example 2008-05-16. The syntax used for specifying the date format is the one used by the jQuery datepicker.

Methods

  • format (Date) returns spring : formats a Date using the specified pattern
  • parse (string) returns Date : parses a string using the specified pattern and returns a Date

ShortDate

Short date is a pattern date with a preconfigured pattern.

Specifications

Registered name

short-date

Base Formatter

pattern-date

Properties

  • pattern : default value is dd/mm/yy. Example 16/05/2008

WireDate

Wire date is a pattern date with a preconfigured pattern.

Specifications

Registered name

wire-date

Base Formatter

pattern-date

Properties

  • pattern : the ISO8601 format yy-mm-dd. Example 2008-05-16
Comments (0)