A stream that emits when the locale changes.
Whether to use timeZone: 'utc' with Intl.DateTimeFormat when formatting dates.
Without this Intl.DateTimeFormat sometimes chooses the wrong timeZone, which can throw off
the result. (e.g. in the en-US locale new Date(1800, 7, 14).toLocaleDateString()
will produce '8/13/1800'.
TODO(mmalerba): drop this variable. It's not being used in the code right now. We're now getting the string representation of a Date object from it's utc representation. We're keeping it here for sometime, just for precaution, in case we decide to revert some of these changes though.
Clamp the given date between min and max dates.
The date to clamp.
The minimum value to allow. If null or omitted no min is enforced.
The maximum value to allow. If null or omitted no max is enforced.
min if date is less than min, max if date is greater than max,
otherwise date.
Compares two dates.
The first date to compare.
The second date to compare.
0 if the dates are equal, a number less than 0 if the first date is earlier, a number greater than 0 if the first date is later.
Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an invalid date for all other values.
Checks if two dates are equal.
The first date to check.
The second date to check.
Whether the two dates are equal. Null dates are considered equal to other null dates.
Sets the locale used for all dates.
The new locale.
Generated using TypeDoc
The locale to use for all dates.