date-fns v1.17.0 Release Notes
Release Date: 2016-12-10 // over 7 years ago-
➕ Added
💅 Polish locale (pl) (thanks to Mateusz Derks @ertrzyiks)
Portuguese locale (pt) (thanks to Dário Freire @dfreire)
Swedish locale (sv) (thanks to Johannes Ulén @ejulen)
French locale (fr) (thanks to Jean Dupouy @izeau)
🐎 Performance tests. See PR: #289
🛠 Fixed
🛠 Fix TypeScript and flow typings for
isValid
. See PR: #310🛠 Fix incorrect locale tests that could potentially lead to
format
bugs. Kudos to Mateusz Derks @ertrzyiks. See related PRs: #312, #320📚 Minor language fixes in the documentation. Thanks to Vedad Šoše @vedadsose (#314) and Asia @asia-t (#318)
🔄 Changed
format
now returnsString('Invalid Date')
if the passed date is invalid. See PR: #323distanceInWords
,distanceInWordsToNow
,distanceInWordsStrict
andformat
functions now check if the passed locale is valid, and fallback to English locale otherwise. See PR: #321Internal: use a loop instead of
Object.keys
inbuildFormattingTokensRegExp
to improve compatibility with older browsers. See PR: #322