From: Iskren Chernev Date: Sat, 16 Apr 2016 06:47:47 +0000 (-0700) Subject: Fix x-pseudo test issues X-Git-Tag: 2.13.0~23^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74d9a1fa8f1c0b232f3ca9a36e9f2a3fdfd0f4e6;p=thirdparty%2Fmoment.git Fix x-pseudo test issues --- diff --git a/src/locale/x-pseudo.js b/src/locale/x-pseudo.js index cced22f82..3bcb80f3b 100644 --- a/src/locale/x-pseudo.js +++ b/src/locale/x-pseudo.js @@ -7,15 +7,17 @@ import moment from '../moment'; export default moment.defineLocale('x-pseudo', { months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + monthsParseExact : true, weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY LT', - LLLL : 'dddd, D MMMM YYYY LT' + LLL : 'D MMMM YYYY HH:mm', + LLLL : 'dddd, D MMMM YYYY HH:mm' }, calendar : { sameDay : '[T~ódá~ý át] LT', @@ -40,6 +42,7 @@ export default moment.defineLocale('x-pseudo', { y : 'á ~ýéár', yy : '%d ý~éárs' }, + ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'th' : diff --git a/src/test/locale/x-pseudo.js b/src/test/locale/x-pseudo.js index bd5d21aad..2ab8ae8d3 100644 --- a/src/test/locale/x-pseudo.js +++ b/src/test/locale/x-pseudo.js @@ -36,7 +36,7 @@ test('format', function (assert) { ['s ss', '50 50'], ['a A', 'pm PM'], ['[the] DDDo [day of the year]', 'the 45th day of the year'], - ['LTS', '15:25:50'], + ['LT', '15:25'], ['L', '14/02/2010'], ['LL', '14 F~ébrú~árý 2010'], ['LLL', '14 F~ébrú~árý 2010 15:25'],