File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2477,15 +2477,12 @@ function getNewLocale(def) {
2477
2477
function addCoreFormats ( ) {
2478
2478
forEach ( CoreParsingFormats , function ( df ) {
2479
2479
var src = df . src ;
2480
- if ( df . localeCheck && ! df . localeCheck ( loc ) ) {
2481
- return ;
2482
- }
2483
2480
if ( df . mdy && loc . mdy ) {
2484
2481
// Use the mm/dd/yyyy variant if it
2485
2482
// exists and the locale requires it
2486
2483
src = df . mdy ;
2487
2484
}
2488
- if ( df . time ) {
2485
+ if ( df . time && ! df . localeCheck || ( df . localeCheck && ! df . localeCheck ( loc ) ) ) {
2489
2486
// Core formats that allow time require the time
2490
2487
// reg on both sides, so add both versions here.
2491
2488
loc . addFormat ( getFormatWithTime ( src , true ) ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ namespace('Date | Finnish', function () {
11
11
12
12
method ( 'create' , function ( ) {
13
13
14
+ assertDateParsed ( '1.12.2019' , new Date ( 2019 , 11 , 1 ) ) ;
14
15
assertDateParsed ( '15. toukokuuta 2011' , new Date ( 2011 , 4 , 15 ) ) ;
15
16
assertDateParsed ( 'torstai 5. tammikuuta 2012' , new Date ( 2012 , 0 , 5 ) ) ;
16
17
assertDateParsed ( 'torstaina 5. tammikuuta 2012' , new Date ( 2012 , 0 , 5 ) ) ;
You can’t perform that action at this time.
0 commit comments