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

Build date can make some defects #243

Open
Sky161 opened this issue Mar 24, 2021 · 0 comments
Open

Build date can make some defects #243

Sky161 opened this issue Mar 24, 2021 · 0 comments

Comments

@Sky161
Copy link
Contributor

Sky161 commented Mar 24, 2021

export const buildDate = (day: number) => (month: number) => (year: number) => new Date(year, month, day);

When we use new Date().getTime() returned mileseconds depends provided format.
For example:

new Date('2021-03-29').getTime(); // 1616976000000 and it's Mon Mar 29 2021 00:00:00
new Date('2021-3-29').getTime(); // 1616965200000 and it's Sun Mar 28 2021 21:00:00

We have lag one day for the same dates.

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

1 participant