Releases: softwareventures/date
Releases · softwareventures/date
v5.0.2
v5.0.1
v5.0.0
5.0.0 (2024-02-16)
⚠ BREAKING CHANGES
- latest: The
latest
functions now
throwError
if both specified Dates
contain numeric fields that are non-finite. - latest: The type parameters of the
latest
functions have been removed. These
functions now always either return a valid
Date or throw. - earliest: The
earliest
functions now
throwError
if both specified Dates
contain numeric fields that are non-finite. - earliest: The type parameters of the
earliest
functions have been removed. These
functions now always either return a valid
Date or throw.
Features
v4.1.1
v4.1.0
4.1.0 (2024-01-25)
Features
- isDateValid: rename dateIsValid to isDateValid, with an alias for compatibility (c6d89e7)
- todayDeviceLocal: rename "todayLocal" to "todayDeviceLocal", with an alias for compatibility (6b23e44)
Bug Fixes
- fromReferenceDays: if referenceDays is non-finite, throw an error (e6237c4)
- fromReferenceDays: if referenceDays is non-integer, round it down (722a267)
- normalize: make normalize explicitly an alias of date (f5b670b)
- toReferenceDays: handle non-integer years and months as sensibly as we can (7a222ac)
v4.0.1
v4.0.0
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.