dayjs icon indicating copy to clipboard operation
dayjs copied to clipboard

[Bug]customParseFormat Zone Error

Open dreamllq opened this issue 6 years ago • 3 comments

parse error

in:
  dayjs("2001 +08:00", 'YYYY Z').format()
out:
  "Invalid Date"
in:
  dayjs("2001-01 +08:00", 'YYYY-MM Z').format()
out:
  "Invalid Date"
in:
  dayjs("2001-01-02 +08:00", 'YYYY-MM-DD Z').format()
out:
  "2001-01-02T00:00:00+08:00"

Information

  • Day.js v1.8.21
  • OS: Mac 10.14.6
  • Browser chrome 80.0.3987.149
  • Time zone: GMT+0800 (中国标准时间)

dreamllq avatar Mar 24 '20 03:03 dreamllq

Have you import the CustomParseFormat plugin first? https://day.js.org/docs/en/parse/string-format

iamkun avatar Mar 24 '20 03:03 iamkun

yes, i have import this file. if i do not import, example 3 will not work .

dreamllq avatar Mar 28 '20 03:03 dreamllq

:tada: This issue has been resolved in version 1.8.25 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

iamkun avatar Apr 21 '20 03:04 iamkun