Skip to content

Releases: taylorhakes/fecha

Add sourcemaps to npm and security fixes

05 Apr 16:28
Compare
Choose a tag to compare

isoDate and isoDateTime

03 Mar 03:31
Compare
Choose a tag to compare
4.2.0

Add test format and create 4.2.0

Added Z format/parse and fixed Peru timezone issue

10 Feb 03:36
Compare
Choose a tag to compare
  • 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

17 Jan 13:47
Compare
Choose a tag to compare

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

06 Jan 00:25
Compare
Choose a tag to compare

Major Features and Breaking changes in this version

Improvements

  • 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
  • ES Module and Tree Shaking Support - You can now import fecha parse or format independently
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
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

16 Apr 03:40
Compare
Choose a tag to compare
3.0.3

Update changelog

Fixed NPM file list

02 Dec 05:04
Compare
Choose a tag to compare
3.0.2

Updated build versions

Fixed leading zero bug with year 999

21 Feb 14:21
Compare
Choose a tag to compare
2.3.3

Fixed bug with 999 missing leading 0

Add typescript definitions

09 May 00:31
Compare
Choose a tag to compare
Merge pull request #35 from 9Y5/yisheng/add-typescript-declaration-file

Add typescript declaration file.

Literal Support

18 Sep 01:50
Compare
Choose a tag to compare

Added literal support to fecha. #18

Thanks @antivanov