date-fns
Advanced tools
Changelog
v2.20.1 - 2021-04-09
This release is brought to you by Sasha Koss and Tan75.
isDate
Flow typings that we broke in v2.20.0
.Changelog
v2.20.0 - 2021-04-08
This release is brought to you by Sasha Koss, Maxim Topciu, tu4mo, Tan75, Ardit Dine, Carl Rosell, Roman Mahotskyi, Mateusz Krzak, fgottschalk, Anastasia Kobzar, Bilguun Ochirbat, Lesha Koss, YuLe and guyroberts21.
Made formatDistanceStrict
and formatDistanceToNowStrict
always return 1 year
instead of 12 months
. (#2388)
Fixed nextDay
, nextMonday
and nextTuesday
missing in exports and type definitions. (#2325)
Changelog
v2.19.0 - 2021-03-05
Tan75 worked on this release.
Assigned the correct firstWeekContainsDate
value (4
) for the French locale. (#2148)
Fixed a bug in differenceInMonths
and intervalToDuration
that occurs when dealing with the 28th of February. (#2255)
Changelog
Changelog
[2.17.0] - 2021-02-05
Kudos to @shaykav, @davidgape89, @rikkalo, @tan75, @talgautb, @owenl131, @kylesezhi, @inigoiparragirre, @gius, @Endeauvirr and @frankyston.
Fixed differenceInMonths
for edge cases, such as the end of February dates.
Fixed formatDuration
week translation in pt
and pt-BR
locales.
Made Japanese locale to use the correct value for the start of the week.
Fixed the short and medium date formats in the Czech locale.
Added intlFormat
a lightweight formatting function that uses Intl API. Eventually, it will become the default formatting function, so it's highly recommended for new code.
Added an ability to format lowercase am/pm with aaa
and bbb
tokens.
Changelog
[2.16.1] - 2020-07-31
Kudos to @aleksaps, @leedriscoll and @BanForFun for pull-requests!
formatRelative
.Changelog
[2.16.0] - 2020-08-27
Kudos to @jvpelt, @piotrl, @yotamofek, @dwaxweiler, @leedriscoll and @bradevans for working on the release. Also thanks to @PascalHonegger, @pickfire, @TheJaredWilcurt, @SidKH and @nfantone for improving the documentation.
1 minute
and 2 days
.formatRFC3339
formatting timezone offset with minutes.formatDuration
Changelog
[2.15.0] - 2020-07-17
Thanks to @belgamo, @Matsuuu, @Imballinst, @arsnyder16, @pankajupadhyay29, @DCBN, @leedriscoll, @gottsohn, @mukuljainx and @dtriana for working on the release. Also kudos to @KidkArolis, @imgx64, @fjc0k, @wmonk, @djD-REK, @dandv, @psimk and @brimworks for improving the documentation.
addBusinessDays
when input date is a weekend day.parseISO
not returning Invalid Date
on incorrect string when there are spaces in it.es
round-tripping dates with Wednesday.d
/EEEE
ordering in tokens like PPPPP
.Changelog
[2.14.0] - 2020-05-18
Kudos to @julamb, @JacobSoderblom, @justingrant, @dragunoff, @jmate0321, @gbhasha, @rasck, @AlbertoPdRF, @sebastianhaberey and @giogonzo for working on the release!
add
, addDays
and addMonths
.formatDistance
strings in the Hungarian locale.formatLong
in the Spanish locale.formatRelative
in the Italian locale.Changelog
[2.13.0] - 2020-05-06
Thanks to @JorenVos, @developergouli, @rhlowe and @justingrant for working on the release!