Skip to content

v4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 Jan 03:50
· 220 commits to main since this release
530418b

4.0.0 (2024-01-25)

⚠ BREAKING CHANGES

  • Date objects now have a type
    discriminator, in the form of a "type" field, which
    is always set to the string "Date". The isDate and
    isValidDate functions will not consider a value to
    be a Date unless the discriminator is present. Most
    other functions continue to accept objects without
    this field, but if it is present it must be set to
    the string "Date". This is to guard against errors
    caused by similar objects such as DateTimes or
    Timestamps being accidentally passed to date
    functions. The type discriminator also makes it easy
    to discriminate Dates from other types in type
    unions.
  • node: node versions < 18, 19 are no longer
    supported.

Features

  • add aliases with "date" in the name to disambiguate from other date-time functions (dbdd52d)
  • add type discriminator (43016c4)
  • node: drop support for node < 18, 19 (cad0aa8)