Releases: taylorhakes/fecha
Releases · taylorhakes/fecha
Add sourcemaps to npm and security fixes
4.2.1 Upgrade eslint
isoDate and isoDateTime
4.2.0 Add test format and create 4.2.0
Added Z format/parse and fixed Peru timezone issue
- Added
Z
format token. See readme for more info. Big thanks to @fer22f for writing the code. - Fixed a strange issue when Peru changed timezones in 1990. See #78
Strict Dates and ES Module Support
Breaking Changes in this release
No changes from alpha and beta. See 4.0.0-alpha for full change log.
Strict Dates and ES Module Support
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
import {format, parse} from 'fecha';
format(...);
parse(...)
Breaking changes
parseDate
may returnnull
when previously returned aDate
. See improvements above, but invalid dates will returnnull
now- Change to how to set masks and i18n
Previously
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'
});
Parsing literals fixes
3.0.3 Update changelog
Fixed NPM file list
3.0.2 Updated build versions
Fixed leading zero bug with year 999
2.3.3 Fixed bug with 999 missing leading 0
Add typescript definitions
Merge pull request #35 from 9Y5/yisheng/add-typescript-declaration-file Add typescript declaration file.
Literal Support
Added literal support to fecha. #18
Thanks @antivanov