Skip to content

Commit

Permalink
Fix "March" in Dutch parsing patterns (#1433)
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelovedokidoki authored and kossnocorp committed Sep 24, 2019
1 parent 0a108ec commit 8220b70
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions src/locale/nl/_lib/match/index.js
Expand Up @@ -28,8 +28,34 @@ var matchMonthPatterns = {
wide: /^(januari|februari|maart|april|mei|juni|juli|augustus|september|oktober|november|december)/i
}
var parseMonthPatterns = {
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
any: [/^jan/i, /^feb/i, /^mrt/i, /^apr/i, /^mei/i, /^jun/i, /^jul/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i
],
any: [
/^jan/i,
/^feb/i,
/^m(r|a)/i,
/^apr/i,
/^mei/i,
/^jun/i,
/^jul/i,
/^aug/i,
/^sep/i,
/^okt/i,
/^nov/i,
/^dec/i
]
}

var matchDayPatterns = {
Expand Down Expand Up @@ -63,7 +89,7 @@ var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
valueCallback: function(value) {
return parseInt(value, 10)
}
}),
Expand All @@ -80,7 +106,7 @@ var match = {
defaultMatchWidth: 'wide',
parsePatterns: parseQuarterPatterns,
defaultParseWidth: 'any',
valueCallback: function (index) {
valueCallback: function(index) {
return index + 1
}
}),
Expand Down

0 comments on commit 8220b70

Please sign in to comment.