goog.i18n.DateTimeParse |
pattern
: string | number
pattern specification or pattern type.
|
![]()
Apply a pattern to this Parser. The pattern string will be parsed and saved
in "compiled" form.
Note: this method is somewhat similar to the pattern parsing method in
datetimeformat. If you see something wrong here, you might want
to check the other.
Arguments:
|
code » | |||||||
![]()
Apply a predefined pattern to this Parser.
Arguments:
|
code » | |||||||
Calculate character repeat count in pattern.
|
code » | |||||||
Parse the given string and fill info into date object.
Arguments:
Returns: number
How many characters parser advanced.
|
code » | |||||||
Check if the pattern part is a numeric field.
|
code » | |||||||
![]()
Identify the start of an abutting numeric fields' run. Taking pattern
"HHmmss" as an example. It will try to parse 2/2/2 characters of the input
text, then if that fails, 1/2/2. We only adjust the width of the leftmost
field; the others remain fixed. This allows "123456" => 12:34:56, but
"12345" => 1:23:45. Likewise, for the pattern "yyyyMMdd" we try 4/2/2,
3/2/2, 2/2/2, and finally 1/2/2. The first field of connected numeric
fields will be marked as abutStart, its width can be reduced to accommodate
others.
|
code » | |||||||
Attempt to match the text at a given position against an array of strings.
Since multiple strings in the array may match (for example, if the array
contains "a", "ab", and "abc", all will match the input string "abcd") the
longest match is returned.
|
code » | |||||||
Parse the given string and fill info into date object. This version does
not validate the input.
|
code » | |||||||
Parse a integer string and return integer value.
|
code » | |||||||
Parse time zone offset.
Arguments:
Returns: boolean
True if successful.
|
code » | |||||||
![]()
Skip space in the string.
|
code » | |||||||
Parse the given string and fill info into date object. This version will
validate the input and make sure it is a validate date/time.
|
code » | |||||||
Parse Day of week field.
Arguments:
Returns: boolean
True if successful.
|
code » | |||||||
Parse fractional seconds field.
|
code » | |||||||
Parse Month field.
|
code » | |||||||
Parse Quarter field.
|
code » | |||||||
Parse year field. Year field is special because
1) two digit year need to be resolved.
2) we allow year to take a sign.
3) year field participate in abut processing.
Arguments:
Returns: boolean
True if successful.
|
code » | |||||||
Protected method that converts one field of the input string into a
numeric field value.
Arguments:
Returns: boolean
True if it parses successfully.
|
code » | |||||||
Parse GMT type timezone.
Arguments:
Returns: boolean
True if successful.
|
code » |
![]()
No description.
|
Code » |
![]()
Pattern characters that specify numerical field.
|
Code » | |
![]()
All acceptable pattern characters.
|
Code » | |
![]()
Number of years prior to now that the century used to
disambiguate two digit years will begin
|
Code » |