fecha v4.0.0 Release Notes
Release Date: 2020-01-17 // about 4 years ago-
Major Features and Breaking changes in this version
๐ Improvements
- ๐ Valid date parsing - By default fecha will check validity of dates. Previously
2019-55-01
or2019-01-42
would parse correctly, since Javascript can handle it. Now invalid dates will returnnull
instead - ๐ ES Module and Tree Shaking Support - You can now import fecha
parse
orformat
independently ```js import {format, parse} from 'fecha';
format(...); parse(...)
#### ๐ฅ Breaking changes - ๐ `parseDate` may return `null` when previously returned a `Date`. See improvements above, but invalid dates will return `null` now - ๐ Change to how to set masks and i18n Previously ```js import fecha from 'fecha'; fecha.i18n = { ... } fecha.masks.myMask = 'DD , MM, YYYY'
๐ New
import {parse, format, setGlobalDateI18n, setGlobalDateMasks} from 'fecha'; setGlobalDateI18n({ // ... }) setGlobalDateMasks({ myMask: 'DD , MM, YYYY' });
- ๐ Valid date parsing - By default fecha will check validity of dates. Previously