Skip to content

Commit

Permalink
Prepare v3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Jan 20, 2024
1 parent fadd58b commit 3707906
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "date-fns",
"version": "3.2.0",
"version": "3.3.0",
"contributors": [
"Sasha Koss <koss@nocorp.me>",
"Lesha Koss <regiusprod@gmail.com>"
Expand Down
1 change: 1 addition & 0 deletions src/fp/_lib/convertToFP/test.ts
Expand Up @@ -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)")

Check failure on line 6 in src/fp/_lib/convertToFP/test.ts

View workflow job for this annotation

GitHub Actions / tests

Unused '@ts-expect-error' directive.
import { flow as lodashFlow } from "lodash";
import { describe, it } from "vitest";
import { addDays, addHours, isEqual } from "../../index.js";
Expand Down

0 comments on commit 3707906

Please sign in to comment.