Skip to content

Commit 4c4b9bd

Browse files
committed
Merge pull request moment#1457 from ichernev/bugfix/albanian-am-pm
@changelog @section enhancements @description Fix armenian meridiem moment#1233
2 parents dbaa189 + 94305dc commit 4c4b9bd

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

lang/sq.js

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
weekdays : "E Diel_E Hënë_E Marte_E Mërkure_E Enjte_E Premte_E Shtunë".split("_"),
1919
weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
2020
weekdaysMin : "D_H_Ma_Më_E_P_Sh".split("_"),
21+
meridiem : function (hours, minutes, isLower) {
22+
return hours < 12 ? 'PD' : 'MD';
23+
},
2124
longDateFormat : {
2225
LT : "HH:mm",
2326
L : "DD/MM/YYYY",

test/lang/sq.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ exports["lang:sq"] = {
5757
['H HH', '15 15'],
5858
['m mm', '25 25'],
5959
['s ss', '50 50'],
60-
['a A', 'pm PM'],
60+
['a A', 'MD MD'],
6161
['[the] DDDo [day of the year]', 'the 45. day of the year'],
6262
['L', '14/02/2010'],
6363
['LL', '14 Shkurt 2010'],
@@ -78,6 +78,15 @@ exports["lang:sq"] = {
7878
test.done();
7979
},
8080

81+
"meridiem" : function (test) {
82+
test.expect(2);
83+
84+
test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "PD", "before dawn");
85+
test.equal(moment([2011, 2, 23, 12, 0]).format('A'), "MD", "noon");
86+
87+
test.done();
88+
},
89+
8190
"format ordinal" : function (test) {
8291
test.expect(31);
8392

@@ -375,12 +384,12 @@ exports["lang:sq"] = {
375384

376385
test.done();
377386
},
378-
387+
379388
"returns the name of the language" : function (test) {
380389
if (typeof module !== 'undefined' && module.exports) {
381390
test.equal(require('../../lang/sq'), 'sq', "module should export sq");
382391
}
383-
392+
384393
test.done();
385394
}
386395
};

0 commit comments

Comments
 (0)