diff --git a/CHANGELOG.md b/CHANGELOG.md index bb4e93fb66..fe687b16c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,30 @@ This change log follows the format documented in [Keep a CHANGELOG]. [semantic versioning]: http://semver.org/ [keep a changelog]: http://keepachangelog.com/ +## v3.3.0 - 2024-01-20 + +On this release worked @kossnocorp, @TheKvikk, @fturmel and @ckcherry23. + +### Fixed + +- Fixed the bug in `getOverlappingDaysInIntervals` caused by incorrect sorting of interval components that led to 0 for timestamps of different lengths. + +- Fixed bugs when working with negative numbers caused by using `Math.floor` (`-1.1` → `-2`) instead of `Math.trunc` (`-1.1` → `-1`). Most of the conversion functions (i.e., `hoursToMinutes`) were affected when passing some negative fractional input. Also, some other functions that could be possibly affected by unfortunate timezone/date combinations were fixed. + + The functions that were affected: `format`, `parse`, `getUnixTime`, `daysToWeeks`, `hoursToMilliseconds`, `hoursToMinutes`, `hoursToSeconds`, `milliseconds`, `minutesToMilliseconds`, `millisecondsToMinutes`, `monthsToYears`, `millisecondsToHours`, `millisecondsToSeconds`, `minutesToHours`, `minutesToSeconds`, `yearsToQuarters`, `yearsToMonths`, `yearsToDays`, `weeksToDays`, `secondsToMinutes`, `secondsToHours`, `quartersToYears`, `quartersToMonths` and `monthsToQuarters`. + +- [Fixed the Czech locale's `formatDistance` to include `1` in `formatDistance`.](https://github.com/date-fns/date-fns/pull/3269) + +- Fixed `differenceInSeconds` and other functions relying on rounding options that can produce a negative 0. + +- [Added a preprocessor to the locales API, enabling fixing a long-standing bug in the French locale.](https://github.com/date-fns/date-fns/pull/3662) ([#1391](https://github.com/date-fns/date-fns/issues/1391)) + +- Added missing `yearsToDays` to the FP submodule. + +### Added + +- [Added `format` alias `formatDate` with corresponding `FormatDateOptions` interface](https://github.com/date-fns/date-fns/pull/3653). + ## v3.2.0 - 2024-01-09 This release is brought to you by @kossnocorp, @fturmel, @grossbart, @MelvinVermeer, and @jcarstairs-scottlogic. diff --git a/package-lock.json b/package-lock.json index 92e590afbe..a9e1f5f2ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "date-fns", - "version": "3.2.0", + "version": "3.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "date-fns", - "version": "3.2.0", + "version": "3.3.0", "license": "MIT", "devDependencies": { "@babel/cli": "^7.22.10", diff --git a/package.json b/package.json index 3493e277ed..98ca1b39fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "date-fns", - "version": "3.2.0", + "version": "3.3.0", "contributors": [ "Sasha Koss ", "Lesha Koss " diff --git a/src/fp/_lib/convertToFP/test.ts b/src/fp/_lib/convertToFP/test.ts index d1a2c1e840..97089fa354 100644 --- a/src/fp/_lib/convertToFP/test.ts +++ b/src/fp/_lib/convertToFP/test.ts @@ -3,6 +3,7 @@ import assert from "assert"; import { pipe } from "fp-ts/function"; import { flow as jsFnsFlow } from "js-fns"; +// @ts-expect-error - Lodash types are tripping ("Module '"lodash"' has no exported member 'flow'.ts(2305)") import { flow as lodashFlow } from "lodash"; import { describe, it } from "vitest"; import { addDays, addHours, isEqual } from "../../index.js";