parse-messy-time
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -13,3 +13,3 @@ var months = [ | ||
var tokre = RegExp( | ||
'\\s+|(\\d+(?:th|nd|rd|th))' | ||
'\\s+|(\\d+(?:st|th|nd|rd|th))\\b' | ||
+ '|' + hmsre.source + '([A-Za-z]+)' | ||
@@ -16,0 +16,0 @@ + '|([A-Za-z]+)' + hmsre.source |
{ | ||
"name": "parse-messy-time", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "parse messy human date and time strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -228,3 +228,28 @@ var parse = require('../'); | ||
); | ||
t.equal( | ||
strftime('%F', parse('the 1st', optsd)), | ||
'2015-04-01', | ||
'the 1st' | ||
); | ||
t.equal( | ||
strftime('%F', parse('the 2nd', optsd)), | ||
'2015-04-02', | ||
'the 2nd' | ||
); | ||
t.equal( | ||
strftime('%F', parse('the 3rd', optsd)), | ||
'2015-04-03', | ||
'the 3rd' | ||
); | ||
t.equal( | ||
strftime('%F', parse('the 4th', optsd)), | ||
'2015-04-04', | ||
'the 4th' | ||
); | ||
t.equal( | ||
strftime('%F', parse('the 10th', optsd)), | ||
'2015-04-10', | ||
'the 10th' | ||
); | ||
t.end(); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22443
588