]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[locale] es-us: Updated time format in accordance with CLDR and www.timeandunits...
authorJørn Ølmheim <jorn@olmheim.com>
Sun, 17 Dec 2017 00:37:02 +0000 (01:37 +0100)
committerKunal Marwaha <marwahaha@berkeley.edu>
Sun, 17 Dec 2017 00:37:01 +0000 (19:37 -0500)
src/locale/es-us.js
src/test/locale/es-us.js

index c4e05cafecca7d7ec0592c368f3288a9447cdc2f..9fa1460fea13a5ff507b17862065a897702080fe 100644 (file)
@@ -24,12 +24,12 @@ export default moment.defineLocale('es-us', {
     weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
     weekdaysParseExact : true,
     longDateFormat : {
-        LT : 'H:mm',
-        LTS : 'H:mm:ss',
+        LT : 'h:mm A',
+        LTS : 'h:mm:ss A',
         L : 'MM/DD/YYYY',
         LL : 'MMMM [de] D [de] YYYY',
-        LLL : 'MMMM [de] D [de] YYYY H:mm',
-        LLLL : 'dddd, MMMM [de] D [de] YYYY H:mm'
+        LLL : 'MMMM [de] D [de] YYYY h:mm A',
+        LLLL : 'dddd, MMMM [de] D [de] YYYY h:mm A'
     },
     calendar : {
         sameDay : function () {
index 3795397d84701ce37db4f6ccb9f4bd96384d2719..cf9056bc16843e813c03225a7e97f172c4bbd52f 100644 (file)
@@ -37,15 +37,16 @@ test('format', function (assert) {
             ['s ss',                               '50 50'],
             ['a A',                                'pm PM'],
             ['[the] DDDo [day of the year]',       'the 45º day of the year'],
-            ['LTS',                                '15:25:50'],
+            ['LT',                                 '3:25 PM'],
+            ['LTS',                                '3:25:50 PM'],
             ['L',                                  '02/14/2010'],
             ['LL',                                 'febrero de 14 de 2010'],
-            ['LLL',                                'febrero de 14 de 2010 15:25'],
-            ['LLLL',                               'domingo, febrero de 14 de 2010 15:25'],
+            ['LLL',                                'febrero de 14 de 2010 3:25 PM'],
+            ['LLLL',                               'domingo, febrero de 14 de 2010 3:25 PM'],
             ['l',                                  '2/14/2010'],
             ['ll',                                 'feb. de 14 de 2010'],
-            ['lll',                                'feb. de 14 de 2010 15:25'],
-            ['llll',                               'dom., feb. de 14 de 2010 15:25']
+            ['lll',                                'feb. de 14 de 2010 3:25 PM'],
+            ['llll',                               'dom., feb. de 14 de 2010 3:25 PM']
         ],
         b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
         i;
@@ -159,13 +160,13 @@ test('fromNow', function (assert) {
 test('calendar day', function (assert) {
     var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                       'hoy a las 12:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),          'hoy a las 12:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),           'hoy a las 13:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),           'mañana a las 12:00',  'tomorrow at the same time');
-    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañana a las 11:00',   'tomorrow minus 1 hour');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoy a las 11:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ayer a las 12:00',    'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                       'hoy a las 12:00 PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),          'hoy a las 12:25 PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),           'hoy a las 1:00 PM',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),           'mañana a las 12:00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañana a las 11:00 AM',   'tomorrow minus 1 hour');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoy a las 11:00 AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ayer a las 12:00 PM',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
@@ -216,4 +217,3 @@ test('weeks year starting sunday formatted', function (assert) {
     assert.equal(moment([2012, 0, 14]).format('w ww wo'),   '2 02 2º', 'Jan 14 2012 should be week 2');
     assert.equal(moment([2012, 0, 15]).format('w ww wo'),   '3 03 3º', 'Jan 15 2012 should be week 3');
 });
-