1 | ### 4.2.0
|
2 | Added isoDate and isoDateTime masks
|
3 |
|
4 | ### 4.1.0
|
5 | Added Z format/parse and fixed Peru timezone issue
|
6 | - Added `Z` format token. See readme for more info. Big thanks to @fer22f for writing the code.
|
7 | - Fixed a strange issue when Peru changed timezones in 1990. See #78
|
8 |
|
9 | ## 4.0.0
|
10 | **Major Features and Breaking changes in this version**
|
11 |
|
12 | #### Improvements
|
13 | - *Valid date parsing* - By default fecha will check validity of dates. Previously `2019-55-01` or `2019-01-42` would parse correctly, since Javascript can handle it. Now invalid dates will return `null` instead
|
14 | - *ES Module and Tree Shaking Support* - You can now import fecha `parse` or `format` independently
|
15 | ```js
|
16 | import {format, parse} from 'fecha';
|
17 |
|
18 | format(...);
|
19 | parse(...)
|
20 | ```
|
21 |
|
22 | #### Breaking changes
|
23 | - `parseDate` may return `null` when previously returned a `Date`. See improvements above, but invalid dates will return `null` now
|
24 | - Change to how to set masks and i18n
|
25 | Previously
|
26 | ```js
|
27 | import fecha from 'fecha';
|
28 |
|
29 | fecha.i18n = { ... }
|
30 | fecha.masks.myMask = 'DD , MM, YYYY'
|
31 | ```
|
32 |
|
33 | New
|
34 | ```js
|
35 | import {parse, format, setGlobalDateI18n, setGlobalDateMasks} from 'fecha';
|
36 |
|
37 | setGlobalDateI18n({
|
38 | // ...
|
39 | })
|
40 | setGlobalDateMasks({
|
41 | myMask: 'DD , MM, YYYY'
|
42 | });
|
43 | ```
|
44 |
|
45 | ### 3.0.3
|
46 | - Fixed bug when using brackets when parsing dates
|
47 | ### 3.0.2
|
48 | - Fixed issue where src files are not included correctly in npm
|
49 |
|
50 | ### 3.0.0
|
51 | - Moved to ES modules
|
52 | - Changed invalid date from `false` to `null`
|
53 |
|
54 | ### 2.3.3
|
55 | Fixed bug with year 999 not having leading zero
|
56 |
|
57 | ### 2.3.2
|
58 | Added typescript definitions to NPM
|
59 |
|
60 | ### 2.3.0
|
61 | Added strict version of date parser that returns null on invalid dates (may use strict version in v3)
|
62 |
|
63 | ### 2.2.0
|
64 | Fixed a bug when parsing Do format dates
|
65 |
|
66 | ## 2.0.0
|
67 | 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]'`.
|