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

Convert date regex to date before comparison. Closes #503. #505

Merged
merged 3 commits into from Dec 1, 2014

Conversation

Projects
None yet
2 participants
@fampinheiro
Copy link
Contributor

fampinheiro commented Dec 1, 2014

Fixes #503.

@Marsup Marsup added the bug label Dec 1, 2014

@Marsup Marsup self-assigned this Dec 1, 2014

@Marsup Marsup added this to the 5.0.2 milestone Dec 1, 2014

lib/date.js Outdated
@@ -56,7 +56,7 @@ internals.toDate = function (value, format) {

var date;
if (format) {
if (format === internals.isoDate) {
if (String(format) === String(internals.isoDate)) {

This comment has been minimized.

@Marsup

Marsup Dec 1, 2014

Member

Can you use toString() instead ?

This comment has been minimized.

@fampinheiro

fampinheiro Dec 1, 2014

Author Contributor

Sure.

expect(err).to.not.exist();
done();
});
})

This comment has been minimized.

@Marsup

Marsup Dec 1, 2014

Member

Missing ;

This comment has been minimized.

@fampinheiro

fampinheiro Dec 1, 2014

Author Contributor

Adding.

fampinheiro added some commits Dec 1, 2014

Change string convertion to toString.
 And add missing semicolon.
@Marsup

This comment has been minimized.

Copy link
Member

Marsup commented Dec 1, 2014

@fampinheiro Ready to merge ?

@fampinheiro

This comment has been minimized.

Copy link
Contributor Author

fampinheiro commented Dec 1, 2014

@Marsup yes it is 📦

Marsup added a commit that referenced this pull request Dec 1, 2014

Merge pull request #505 from fampinheiro/master
Convert date regex to date before comparison. Closes #503.

@Marsup Marsup merged commit 66e04b5 into hapijs:master Dec 1, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.