Skip to content

Releases: wanasit/chrono

v2.9.0

23 Sep 02:55

Choose a tag to compare

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.9.0

v2.8.5

23 Sep 02:46

Choose a tag to compare

  • New: export it and sv locales f13e64e
  • Fix: Do not parse year-like numbers as times deb72c5
  • Fix: JP time parsing improvement b1bde28

v2.8.4...v2.8.5

v2.8.4

04 Aug 14:56

Choose a tag to compare

  • 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...v2.8.4

v2.8.3

14 Jun 12:30

Choose a tag to compare

  • 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.3

v2.8.2

01 Jun 00:08

Choose a tag to compare

  • Fix: Correct import error in 2.8.1

v2.8.1...v2.8.2

v2.8.1

25 May 00:52

Choose a tag to compare

  • Fix: ignore short digits following date (#595 ) 971b833
  • Refactor: Update the devDependencies 174b35e
  • [JP] Various NL improvement by @koji520 (#594 )

v2.8.0...v2.8.1

v2.8.0

06 Apr 01:24

Choose a tag to compare

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.8.0

v2.7.9

30 Mar 13:49

Choose a tag to compare

  • New: Italian (IT) support (beta/untested).
  • New: (en) add "Overmorrow" support in casual date e1acb29
  • Fix: (jp) rewrite 当日 to 本日
  • Fix: timezone option for relative dates should affect time 8c415a8

v2.7.8...v2.7.9

v2.7.8

25 Jan 02:44

Choose a tag to compare

  • 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...v2.7.8

v2.7.7

16 Sep 06:01

Choose a tag to compare

  • 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

v2.7.6...v2.7.7