Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dayjs not work in safari 13 #1144

Closed
jjzhangtt opened this issue Oct 16, 2020 · 2 comments
Closed

Dayjs not work in safari 13 #1144

jjzhangtt opened this issue Oct 16, 2020 · 2 comments

Comments

@jjzhangtt
Copy link

jjzhangtt commented Oct 16, 2020

Describe the bug

It works well in safari 14, but wrong in 13.
I have tried #73 (comment), but i failed.

import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';

dayjs.extend(customParseFormat);

dayjs("2020-10-16T03:40:16.000+0000").format("YYYY-MM-DD HH:mm:ss");  // Invalid Date
Expected behavior

It will return a string of time.

Information
  • Day.js Version [1.9.3]
  • OS: [MacOS]
  • Browser [safari 13.1.2]
  • Time zone: [GMT-08:00 DST (China autumn Time)]
@iamkun
Copy link
Owner

iamkun commented Oct 16, 2020

Please double-check the code in this comment.
#73 (comment)

I believe you've copied the wrong code.

@jjzhangtt
Copy link
Author

Please double-check the code in this comment.
#73 (comment)

I believe you've copied the wrong code.

Thanks, it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants