Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 95abaaf

Browse files
committed
Update dateparser.spec.js
fix(dateparser): Optional leading '0' for 'M' and 'd' dateparser
1 parent d660726 commit 95abaaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dateparser/test/dateparser.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe('date parser', function () {
3131

3232
it('should work correctly for `M`', function() {
3333
expectParse('8/11/2013', 'M/dd/yyyy', new Date(2013, 7, 11, 0));
34+
expectParse('08/11/2013', 'M/dd/yyyy', new Date(2013, 7, 11, 0));
3435
expectParse('07.11.05', 'dd.M.yy', new Date(2005, 10, 7, 0));
3536
expectParse('02-5-11', 'dd-M-yy', new Date(2011, 4, 2, 0));
3637
expectParse('2/05/1980', 'M/dd/yyyy', new Date(1980, 1, 5, 0));
@@ -55,6 +56,7 @@ describe('date parser', function () {
5556
it('should work correctly for `d`', function() {
5657
expectParse('17.November.13', 'd.MMMM.yy', new Date(2013, 10, 17, 0));
5758
expectParse('8-March-1991', 'd-MMMM-yyyy', new Date(1991, 2, 8, 0));
59+
expectParse('08-March-1991', 'd-MMMM-yyyy', new Date(1991, 2, 8, 0));
5860
expectParse('February/5/1980', 'MMMM/d/yyyy', new Date(1980, 1, 5, 0));
5961
expectParse('1955/February/5', 'yyyy/MMMM/d', new Date(1955, 1, 5, 0));
6062
expectParse('11-08-13', 'd-MM-yy', new Date(2013, 7, 11, 0));

0 commit comments

Comments
 (0)