Releases: wanasit/chrono
v2.9.0
New/Fix: Remove dayjs dependency
We have been working toward making Chrono relying only on native Javascript date/time library; and now we are ready to drop dayjs dependency.
This change removes ParsingComponent.dayjs() and dayjs from package.json (50585af). Thus, it is published in a minor version.
v2.8.5
v2.8.4
- Fix: Timezone override in the options is not correctly applied in reference #608, 958eb3d
- New: Swedish (SW) initial support (by @Nicklasfox) a5c52cf.
v2.8.3
- Rewrite duration calculations (without DayJs) abba434
- Fix: (en) "noon" time assignment confidence (by @crazyjncsu)
- Fix: export type ParsingContext (by @wickedest)
v2.8.2
v2.8.1
v2.8.0
New/Fix: Reference date calculation on the assigned timezone 4033a27
Previously, the reference date calculation (e.g., "1 day ago", "tomorrow at 9am") was based on the interpretation of the reference instant/timestamp using the system timezone rather than the assigned timezone (e.g., "April 5" in the system timezone may already "April 6" in the assigned timezone).
const refInstant = new Date("2025-02-27T22:00:00.000Z");
// This instant/timestamp
// = Thu Feb 27 2025 15:00:00 GMT-0800 (PST)
// = Fri Feb 28 2025 08:00:00 GMT+0900 (JST)
chrono.parseDate("Tomorrow at 9am", { instant: refInstant, timezone: "PST" })
// In PST, "Tomorrow at 9am" => Fri Feb 28 2025 09:00:00 GMT-0800 (PST)
chrono.parseDate("Tomorrow at 9am", { instant: refInstant, timezone: "JST" })
// In JST, "Tomorrow at 9am" => Sat Mar 1 2025 09:00:00 GMT+0900 (JST)This changed some current relative date/time output. So, it is published in a minor version, instead of a patch.
v2.7.9
v2.7.8
- Fix: (en) The second could be an ordinal number or time-unit 6d8d672
- Fix: (en) Recognize "of" between month name and year 257722f
- Fix: (en) The "may" could be verb or month name a857d3f
- New: add debug tags for result/relativeDate 80c126b
- New: add debug tags for parser/SlashDateFormatParser and parser/ENTimeExpressionParser 6646c75
- New: (en) Add support for weekend/weekday mentioning 3a15d3d
v2.7.7
- Fix: (en) incorrect timeunit words extraction 08e4dc4
- Fix: Forward dates option affect relative timeago results 31bcae3
- Fix: ISO format default to local timezone instead of UTC 696d247
- Fix: Hyphanated (or slash) dates started by year intepretation d61f933
- Fix: (en) support new separator for date/time 23abdda
- New: (en) Add year suffix extraction refiner be6e995