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

Number类型和String类型的时间戳解析出不同的结果 #764

Closed
jimizai opened this issue Jan 2, 2020 · 5 comments
Closed

Number类型和String类型的时间戳解析出不同的结果 #764

jimizai opened this issue Jan 2, 2020 · 5 comments

Comments

@jimizai
Copy link

jimizai commented Jan 2, 2020

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Information

  • Day.js Version [e.g. v1.8.18]
  • Browser [e.g. chrome 62]
  • Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]

image
image

@iamkun
Copy link
Owner

iamkun commented Jan 3, 2020

Unix time should always be a number, not a string.

@jimizai
Copy link
Author

jimizai commented Jan 3, 2020

我知道 当时可能是因为我的架构问题 传给前端之后自动转成了string ,我在前端操作的时候发现了问题, 我也是希望如果作者可以做一个兼容的话 is better

@iamkun
Copy link
Owner

iamkun commented Jan 3, 2020

Sorry, we have no plan to support this. For instance, how can we tell dayjs('19990808') should result to "1999-08-08" or "1970-01-01 13:00:00"?

@iamkun iamkun closed this as completed Jan 3, 2020
@jimizai
Copy link
Author

jimizai commented Jan 3, 2020

Whatever, thanks a lot, I really like dayjs. It helped me a lot

@iamkun
Copy link
Owner

iamkun commented Jan 3, 2020

@jimizai cheers 😁

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