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

fix date convert error #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

JoeyBling
Copy link

On Windows: use the function toLocaleString("zh-CN") to output special symbols, resulting in date conversion failure.
for e.g.

let nowDate = new Date().toLocaleString("zh-CN")
console.log(nowDate)
// output: 2020-7-23 7:16:11 ├F10: AM┤
// if convert to ISOString An exception will occur
console.log(new Date(nowDate).toISOString())

node version:v12.18.2
npm version:6.14.5

I tried to install the global internationalization support dependency,but it didn't work

npm install -g full-icu

@ekoeryanto
Copy link
Owner

can't it fixed just by dateFormater option?

@JoeyBling
Copy link
Author

that's ok, but I don't want to rewrite it
Because I didn't cause the problem, and I don't know what happened

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

Successfully merging this pull request may close these issues.

None yet

2 participants