Releases: softwareventures/timestamp
Releases · softwareventures/timestamp
v2.2.2
v2.2.1
v2.2.0
v1.4.0
v2.1.0
v2.0.0
2.0.0 (2024-02-16)
⚠ BREAKING CHANGES
- TimestampOptions: When constructing a
Timestampfrom
TimestampOptions, all fields are now mandatory
except fortype,minutes, andseconds. - latest: The
latestand
latestTimestampfunctions now take exactly two
Timestamps as arguments instead of an Iterable. The
advantage of this approach is that the function never
returnsnull. If you need the old behaviour,
compose it by using thefoldfunction from
@softwareventures/iterable instead. - earliest: The
earliestand
earliestTimestampfunctions now take exactly two
Timestamps as arguments instead of an Iterable. The
advantage of this approach is that the function never
returnsnull. If you need the old behaviour,
compose it by using thefoldfunction from
@softwareventures/iterable instead. - fromReferenceSeconds: The functions
timestamp,
normalize,normalizeTimestamp,
fromReferenceSeconds,
timestampFromReferenceSeconds,earliest,
earliestTimestamp,earliestFn,
earliestTimestampFn,latest,latestTimestamp,
latestFn, andlatestTimestampFnnow throw
Errorif any numeric values are non-finite. - The discriminator string has
changed from "timestamp" (lowercase) to "Timestamp"
(capital "T"). This change will break for consumers
who check the discriminator directly (for example to
discriminate from other types in a union) or who
serialize and deserialize Timestamp objects with the
discriminator intact. - node: node versions < 18, 19 are no longer
supported.
Features
- change discriminator string from "timestamp" to "Timestamp" (e126a03)
- earliest: take exactly two Timestamps as arguments instead of an Iterable (eb34f8b)
- latest: take exactly two Timestamps as arguments instead of an Iterable (e6eb29c)
- node: drop support for node < 18, 19 (ad84de6)
- TimestampOptions: require all fields except
type,minutes,seconds(7f55f7c)
Bug Fixes
v1.3.0
v1.2.0
1.2.0 (2024-02-16)
Features
- add constants for each month (156fcd9)
- after: add timestampAfter and timestampAfterFn aliases (63036ce)
- afterOrEqual: add timestampAfterOrEqual and timestampAfterOrEqualFn aliases (7897d4d)
- before: add timestampBefore and timestampBeforeFn aliases (5825f24)
- beforeOrEqual: add timestampBeforeOrEqual and timestampBeforeOrEqualFn aliases (bfadee1)
- compare: add compareTimestamps and compareTimestampsFn aliases (6db2a2f)
- earliest: add earliestTimestamp and earliestTimestampFn aliases (beda1a0)
- equal: add timestampsEqual and timestampsEqualFn aliases (7df6fe6)
- formatIso8601: add formatTimestampIso8601 alias (881ec93)
- fromReferenceSeconds: add timestampFromReferenceSeconds alias (a331b63)
- isValid: add isTimestampValid alias (ef2a702)
- isValid: add isValid function (86f7d61)
- isValidTimestamp: add isValidTimestamp function (b44096b)
- latest: add latestTimestamp and latestTimestampFn aliases (bb879fc)
- notEqual: add timestampsNotEqual and timestampsNotEqualFn aliases (b44819c)
- now: add timestampNow alias (2c0fce7)
- parseIso8601: accept any sequence of whitespace characters in place of the "T" delimiter (23dd7c9)
- parseIso8601: add parseTimestampIso8601 alias (e0d7d1e)
- timestamp: add normalizeTimestamp alias (04e5b48)
- toReferenceSeconds: add timestampToReferenceSeconds alias (42c6f22)
- validate: add validate function (4d8e776)