Skip to content
New issue

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

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

Already on GitHub? # to your account

Bad judgment :isValid #2782

Open
KilianShen opened this issue Dec 5, 2024 · 3 comments
Open

Bad judgment :isValid #2782

KilianShen opened this issue Dec 5, 2024 · 3 comments

Comments

@KilianShen
Copy link

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.11.13]
  • OS: [e.g. win]
  • Browser [e.g. chrome 113]
  • Time zone: [e.g. GMT-07:00 DST (Pacific Daylight Time)]
    image
@RyanV-Souza
Copy link

RyanV-Souza commented Dec 11, 2024

I don't think this is a bug, because when we start a Date Object with a number, it is read as if it were milliseconds. For example: JavaScript is based on Epoch Time, so new Date(0) is like 1970-01-01 00:00:00 and new Date(1000) is like 1970-01-01 00:00:01.

@pccai
Copy link

pccai commented Dec 22, 2024

image

@pccai
Copy link

pccai commented Dec 22, 2024

String.prototype.isValid = function() { return this.length > 0; //a demo };

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

No branches or pull requests

3 participants