Skip to content

Commit 9655e75

Browse files
committed
Only call localCheck when time is involved
1 parent 3ca5781 commit 9655e75

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2485,7 +2485,7 @@ function getNewLocale(def) {
24852485
// exists and the locale requires it
24862486
src = df.mdy;
24872487
}
2488-
if (df.time) {
2488+
if (df.time && !df.localeCheck || (df.localeCheck && !df.localeCheck(loc))) {
24892489
// Core formats that allow time require the time
24902490
// reg on both sides, so add both versions here.
24912491
loc.addFormat(getFormatWithTime(src, true));

test/tests/locales/fi.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ namespace('Date | Finnish', function () {
1111

1212
method('create', function() {
1313

14+
assertDateParsed('1.12.2019', new Date(2019, 11, 1));
1415
assertDateParsed('15. toukokuuta 2011', new Date(2011, 4, 15));
1516
assertDateParsed('torstai 5. tammikuuta 2012', new Date(2012, 0, 5));
1617
assertDateParsed('torstaina 5. tammikuuta 2012', new Date(2012, 0, 5));

0 commit comments

Comments
 (0)