An open-source, lightweight tier list creator. Craft custom rankings, use pre-made templates, and easily share your tier lists. No account needed - just create, rank, and share!
Fixed internal constructFrom throwing an exception on null arguments. While null isn't allowed, the functions should rather return Invalid Date or NaN in such cases. See #3885.
Added
Added missing time zone support to format, formatISO, formatISO9075, formatRelative and formatRFC3339. See #3886.
v4.0.0
I have great news! First, ten years after its release, date-fns finally gets first-class time zone support.
Another great news is that there aren't many breaking changes in this release. All of them are type-related and will affect only those explicitly using internal date-fns types. Finally, it has been less than a year since the last major release, which is an improvement over the previous four years between v2 and v3. I plan on keeping the pace and minimizing breaking changes moving forward.
Added time zones support via @date-fns/tz's TZDate class and tz helper function. See its README for the details about the API.
All relevant functions now accept the context in option, which allows to specify the time zone to make the calculations in. If the function also returns a date, it will be in the specified time zone:
import { addDays, startOfDay } from "date-fns";
import { tz } from "@date-fns/tz";
In the example, addDays will get the current date and time in Singapore and add 5 days to it. startOfDay will inherit the date type and return the start of the day in Singapore.
Changed
The function arguments, as well as Interval's start and end, now can be of different types, allowing you to mix UTCDate, TZDate, Date, and other extensions, as well as primitives (strings and numbers).
The functions will normalize these values, make calculations, and return the result in the same type, preventing any bugs caused by the discrepancy. If passed, the type will be inferred from the context in option or the first encountered argument object type. The Interval's start and end will be considered separately, starting from start.
In the given example, the result will be in the TZDate as the first argument is a number, and the start takes precedence over the end.
clamp(Date.now(), {
start: new TZDate(start, "Asia/Singapore"),
end: new UTCDate(),
Fixed internal constructFrom throwing an exception on null arguments. While null isn't allowed, the functions should rather return Invalid Date or NaN in such cases. See #3885.
Added
Added missing time zone support to format, formatISO, formatISO9075, formatRelative and formatRFC3339. See #3886.
v4.0.0 - 2024-09-16
I have great news! First, ten years after its release, date-fns finally gets first-class time zone support.
Another great news is that there aren't many breaking changes in this release. All of them are type-related and will affect only those explicitly using internal date-fns types. Finally, it has been less than a year since the last major release, which is an improvement over the previous four years between v2 and v3. I plan on keeping the pace and minimizing breaking changes moving forward.
Added time zones support via @date-fns/tz's TZDate class and tz helper function. See its README for the details about the API.
All relevant functions now accept the context in option, which allows to specify the time zone to make the calculations in. If the function also returns a date, it will be in the specified time zone:
import { addDays, startOfDay } from "date-fns";
import { tz } from "@date-fns/tz";
In the example, addDays will get the current date and time in Singapore and add 5 days to it. startOfDay will inherit the date type and return the start of the day in Singapore.
Changed
The function arguments, as well as Interval's start and end, now can be of different types, allowing you to mix UTCDate, TZDate, Date, and other extensions, as well as primitives (strings and numbers).
The functions will normalize these values, make calculations, and return the result in the same type, preventing any bugs caused by the discrepancy. If passed, the type will be inferred from the context in option or the first encountered argument object type. The Interval's start and end will be considered separately, starting from start.
In the given example, the result will be in the TZDate as the first argument is a number, and the start takes precedence over the end.
🐞 fix #12021 issue with disable prop not reflecting on re-render without trigger by useEffect (#12193)
👩🌾 close #12168 optimise re-render with validating fields subscription (#12192)
🐞 fix #12127 issue with compare object value changed with object input (#12185)
🎲 improve : break out of recursive loops on first focus (#11827)
📖 fix example of ObjectKeys type (#11965)
Bumps the dependencies group with 15 updates in the / directory:
16.6.0
17.0.0
14.2.5
14.2.13
3.6.0
4.1.0
14.2.5
14.2.13
7.52.2
7.53.0
5.2.1
5.3.0
2.4.0
2.5.2
22.1.0
22.7.4
18.3.3
18.3.10
8.57.0
8.57.1
14.2.5
14.2.13
8.4.40
8.4.47
0.33.4
0.33.5
3.4.7
3.4.13
5.5.4
5.6.2
Updates
@hello-pangea/dnd
from 16.6.0 to 17.0.0Release notes
Sourced from
@hello-pangea/dnd
's releases.... (truncated)
Changelog
Sourced from
@hello-pangea/dnd
's changelog.... (truncated)
Commits
feaa5af
chore: release 17.0.0646858e
chore(deps): update dependency@babel/runtime
to ^7.25.68334755
feat(redux): bump redux to v5 and react-redux to v938e6b49
feat(react): drop support for v16 and v17c83cb54
ci: update wagoid/commitlint-github-action action to v6460f580
chore(dev-deps): update dependency rimraf to v68f149d2
chore(deps-dev): bump express from 4.19.1 to 4.20.0b57aa06
chore(dev-deps): update dependency wait-on to v8fbb66cc
chore(dev-deps): update dependency jest-axe to v9fa6119c
chore(deps-dev): bump ws from 7.5.9 to 7.5.10Updates
@next/mdx
from 14.2.5 to 14.2.13Release notes
Sourced from
@next/mdx
's releases.... (truncated)
Commits
f550237
v14.2.136d7ced4
v14.2.12bfbc92a
v14.2.11937651f
v14.2.106fa8982
v14.2.963b999c
v14.2.8a1c3a03
v14.2.7427c01d
v14.2.6Updates
date-fns
from 3.6.0 to 4.1.0Release notes
Sourced from date-fns's releases.
... (truncated)
Changelog
Sourced from date-fns's changelog.
... (truncated)
Commits
313b902
Fix v4.1.0 change log entry26cd336
Promote to v4.1.097b53b9
Cover time zone edge cases59b7563
Add missing time zone support to format, formatISO, formatISO9075, formatRela...0121164
Prevent constructFrom from throwing an error on nullbd87ef5
Update@date-fns/docs
99b4e67
Prepare v4.08df1706
Rewrite the time zones doce351977
Promote to v4.0.0-beta.18523656
Fix scripts/test/types.shUpdates
next
from 14.2.5 to 14.2.13Release notes
Sourced from next's releases.
... (truncated)
Commits
f550237
v14.2.13b0ff3d0
Fix startTime error on Android 9 with Chrome 74 (#67391)49566f5
Fix vercel og package memory leak (#70214)62fbd7f
feat: add polyfill ofURL.canParse
for browser compatibility (#70228)b503b8e
Fix missing cache-control on SSR app route (#70265)6d7ced4
v14.2.12367c6e6
update prefetching jsdoc & documentation (#68047)16ad368
Ensure we chunk revalidate tag requests (#70189)77910c8
(backport) fix(eslint): allow typescript-eslint v8 (#70090)0b907c7
[ppr] Don't mark RSC requests as /_next/data requests (backport of #66249) (#...Updates
react-hook-form
from 7.52.2 to 7.53.0Release notes
Sourced from react-hook-form's releases.
Changelog
Sourced from react-hook-form's changelog.
... (truncated)
Commits
35e2d77
7.53.081f472c
🌫️ close #12148 supportisValid
when mode is set toonBlur
(#12194)7b61061
🐞 fix #12021 issue with disable prop not reflect on re-render without trigger...829d492
👩🌾 close #12168 optimise re-render with validating fields subscription (#12192)ba50380
🐞 fix #12127 issue with compare object value changed with object input (#12185)e069d69
🎲 improve : break out of recursive loops on first focus (#11827)3e3f3b5
📖 fix example ofObjectKeys
type (#11965)ea0f3ed
❤️ thank you so much for Route4Me Route Planner sponsorUpdates
react-icons
from 5.2.1 to 5.3.0Release notes
Sourced from react-icons's releases.
Commits
6188fc0
v5.3.04c27624
update icons (#968)bfaef17
feat: update simple icons to 12.4.0 (#956)03c80d9
Bump ws from 7.5.9 to 7.5.10 (#954)b90a4b2
Bump braces from 3.0.2 to 3.0.3 (#953)4c39c24
Bump ejs from 3.1.9 to 3.1.10 (#942)Updates
tailwind-merge
from 2.4.0 to 2.5.2Release notes
Sourced from tailwind-merge's releases.
Commits
a72f2f4
v2.5.20f0f53e
add changelog for v2.5.2a9ebe22
Merge pull request #459 from dcastil/bugfix/458/fix-multiline-not-working-any...37339ce
accept multiline input again15c741f
add test case for multiline inputc795f4b
fix typo in changelog056b2a3
v2.5.141e589b
add changelog for v2.5.180d01a1
Merge pull request #457 from dcastil/bugfix/456/fix-space-at-beginning-causin...400b90d
fix space at beginning of input causing infinite loopUpdates
@types/node
from 22.1.0 to 22.7.4Commits
Updates
@types/react
from 18.3.3 to 18.3.10Commits
Updates
eslint
from 8.57.0 to 8.57.1Release notes
Sourced from eslint's releases.
Changelog
Sourced from eslint's changelog.
@dependabot ignore date-fns major version
OK, I won't notify you about version 4.x.x of date-fns again, unless you unignore it.
Looks like these dependencies are updatable in another way, so this is no longer needed.