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
Add International date format support #25
Conversation
Hi @godban, thanks for the PR! Since there are a lot of variations of date formats, maybe we should go with the most permissive, which I think would be 1-4 numbers, delimiter ( That way all the following would be valid dates: 2018-04-16 What do you think? |
@ungoldman yea, make sense. Updated |
so... what's up, Doc? |
@@ -4,7 +4,7 @@ var removeMarkdown = require('remove-markdown') | |||
|
|||
// patterns | |||
var semver = /\[?v?([\w\d.-]+\.[\w\d.-]+[a-zA-Z0-9])\]?/ | |||
var date = /.*([\d]{4}-[\d]{2}-[\d]{2}).*/ | |||
var date = /.*[ ](\d\d?\d?\d?[-/.]\d\d?[-/.]\d\d?\d?\d?).*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ ]
is not necessary here (means "one of one whitespace" basically). Otherwise looks good.
Hi @godban. Sorry I've been busy. Looks good enough, thanks. |
📦 |
Hey there, thx for a nice package. As European user, I want to have possibility declare dates in European format
DD-MM-YYYY
. This PR extends Date regex with it.