I also added a regression test to be able to test this without having to
wake up at 1 o'clock in the morning.
return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
},
lastWeek : function () {
- return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : '') + '] LT';
+ return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
sameElse : 'L'
},
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
+ },
+
+ "regression tests" : function(test) {
+ test.expect(1);
+ moment.lang('gl');
+
+ var lastWeek = moment().subtract({ d: 4 }).hours(1);
+ test.equal(lastWeek.calendar(), lastWeek.format('[o] dddd [pasado a] LT'), "1 o'clock bug");
+
+
+ test.done();
}
-};
\ No newline at end of file
+};