Repository URL to install this package:
Version:
1.1.0-1 ▾
|
Added isoDate and isoDateTime masks
Added Z format/parse and fixed Peru timezone issue
Z
format token. See readme for more info. Big thanks to @fer22f for writing the code.Major Features and Breaking changes in this version
2019-55-01
or 2019-01-42
would parse correctly, since Javascript can handle it. Now invalid dates will return null
insteadparse
or format
independentlyimport {format, parse} from 'fecha'; format(...); parse(...)
parseDate
may return null
when previously returned a Date
. See improvements above, but invalid dates will return null
nowimport 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' });
false
to null
Fixed bug with year 999 not having leading zero
Added typescript definitions to NPM
Added strict version of date parser that returns null on invalid dates (may use strict version in v3)
Fixed a bug when parsing Do format dates
Fecha now throws errors on invalid dates in fecha.format
and is stricter about what dates it accepts. Dates must pass Object.prototype.toString.call(dateObj) !== '[object Date]'
.