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
[metascrapper-date] 2001 is default year for Date('Jun 20') #241
Comments
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 10, 2019
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 10, 2019
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 10, 2019
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 10, 2019
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 10, 2019
slavaGanzin
added a commit
to slavaGanzin/metascraper
that referenced
this issue
Dec 11, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
package.json
.Subject of the issue
When date is presented omitting year, for example Jun 20. Chrome/NodeJS
new Date
will not produceNaN
as it should and will output2001-06-11T21:00:00.000Z
which is total mess.while chrono parse it right:
You can find date in this format here:
https://vicki.substack.com/p/keybase-and-the-chaos-of-crypto
Proposition
completely remove native parsing and use crono as reliable parser:
https://github.com/microlinkhq/metascraper/blob/master/packages/metascraper-helpers/index.js#L201-L202
p.s. I don't know why Date / chrono add 21 and 9 hours to date respectivly, but I think it's negligible if date has no year.
The text was updated successfully, but these errors were encountered: