diff --git a/src/locale/es/_lib/localize/index.js b/src/locale/es/_lib/localize/index.js index 4d7fb60f63..34f7df50ef 100644 --- a/src/locale/es/_lib/localize/index.js +++ b/src/locale/es/_lib/localize/index.js @@ -14,15 +14,49 @@ var quarterValues = { var monthValues = { narrow: ['e', 'f', 'm', 'a', 'm', 'j', 'j', 'a', 's', 'o', 'n', 'd'], - abbreviated: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], - wide: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'] + abbreviated: [ + 'ene', + 'feb', + 'mar', + 'abr', + 'may', + 'jun', + 'jul', + 'ago', + 'sep', + 'oct', + 'nov', + 'dic' + ], + wide: [ + 'enero', + 'febrero', + 'marzo', + 'abril', + 'mayo', + 'junio', + 'julio', + 'agosto', + 'septiembre', + 'octubre', + 'noviembre', + 'diciembre' + ] } var dayValues = { narrow: ['d', 'l', 'm', 'm', 'j', 'v', 's'], short: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sa'], - abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sab'], - wide: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'] + abbreviated: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'], + wide: [ + 'domingo', + 'lunes', + 'martes', + 'miércoles', + 'jueves', + 'viernes', + 'sábado' + ] } var dayPeriodValues = { @@ -90,7 +124,7 @@ var formattingDayPeriodValues = { } } -function ordinalNumber (dirtyNumber) { +function ordinalNumber(dirtyNumber) { var number = Number(dirtyNumber) return number + 'º' } @@ -106,7 +140,7 @@ var localize = { quarter: buildLocalizeFn({ values: quarterValues, defaultWidth: 'wide', - argumentCallback: function (quarter) { + argumentCallback: function(quarter) { return Number(quarter) - 1 } }), diff --git a/src/locale/es/_lib/match/index.js b/src/locale/es/_lib/match/index.js index 751e6870b2..966f9a3c47 100644 --- a/src/locale/es/_lib/match/index.js +++ b/src/locale/es/_lib/match/index.js @@ -11,7 +11,10 @@ var matchEraPatterns = { } var parseEraPatterns = { any: [/^ac/i, /^dc/i], - wide: [/^(antes de cristo|antes de la era com[uú]n)/i, /^(despu[eé]s de cristo|era com[uú]n)/i] + wide: [ + /^(antes de cristo|antes de la era com[uú]n)/i, + /^(despu[eé]s de cristo|era com[uú]n)/i + ] } var matchQuarterPatterns = { @@ -29,8 +32,34 @@ var matchMonthPatterns = { wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i } var parseMonthPatterns = { - narrow: [/^e/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], - any: [/^en/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i] + narrow: [ + /^e/i, + /^f/i, + /^m/i, + /^a/i, + /^m/i, + /^j/i, + /^j/i, + /^a/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ], + any: [ + /^en/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i + ] } var matchDayPatterns = { @@ -65,7 +94,7 @@ var match = { ordinalNumber: buildMatchPatternFn({ matchPattern: matchOrdinalNumberPattern, parsePattern: parseOrdinalNumberPattern, - valueCallback: function (value) { + valueCallback: function(value) { return parseInt(value, 10) } }), @@ -82,7 +111,7 @@ var match = { defaultMatchWidth: 'wide', parsePatterns: parseQuarterPatterns, defaultParseWidth: 'any', - valueCallback: function (index) { + valueCallback: function(index) { return index + 1 } }),