Skip to content

constants

Exposes the low-level constants used by the date helpers (common durations, timestamp bounds, TheDate regular expression).

Interactive example

Content

  • minTimestamp / maxTimestamp
  • minTimeValue / maxTimeValue
  • millisecondsInOneDay, millisecondInOneWeek, millisecondInOneHour, etc.
  • secondsInOneMinute, minutesInOneHour, hoursInOneDay, daysInOneWeek, monthsInOneYear.
  • theDateRegex: regular expression that validates TheDate strings.
  • theTimeRegex: regular expression that validates TheTime strings.

Usage

Use these constants for your business calculations (e.g., convert a number of days into milliseconds) or to check that a timestamp lies within JavaScript's supported limits.

See also

Released under the MIT license.