assisrafael / assisrafael/js-var-type

Função isDate retornando true para data inválida

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

No arquivo date.js, a função `isDate()` retorna true para qualquer valor que tenha sido gerado por meio de um _Date constructor_.
Dessa forma, `isDate(new Date("string qualquer"))` por exemplo retorna `true`, mesmo que a data informada seja uma _Invalid Date_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading date.js and the isDate() implementation. Reproduce the reported case with new Date("string qualquer") and confirm it is treated as an Invalid Date. Done means isDate() no longer returns true for that invalid Date while preserving the expected behavior for valid Date values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.