Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added failing test for showing existing issue with 12 hour AM/PM coer…

…sion
  • Loading branch information...
commit f88df0ca08d5e51e1ee667f502738d210e64a257 1 parent 1f3e168
@prozacgod prozacgod authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 spec/date.spec.js
View
13 spec/date.spec.js
@@ -471,6 +471,19 @@ describe('timezoneJS.Date', function () {
}
});
+ xit('Represents hours in 12 hour format by k side effect', function () {
+ for (var i = 0; i < 24; i ++) {
+ var ampm = i >= 12 ? "PM" : "AM";
+ var hour = (i % 12);
+ hour = (hour === 0) ? '12' : hour.toString();
+ zhour = hour > 9 ? hour.toString() : '0' + hour;
+
+ var time_value = new timezoneJS.Date(2013, 1, 1, i, 0, 0, 0, "America/Chicago");
+ expect(time_value.toString("H k")).toEqual(hour + " " + ampm);
+ expect(time_value.toString("HH k")).toEqual(zhour + " " + ampm);
+ }
+ });
+
it('Represents hours in single digit 12 hour format', function () {
for (var i = 0; i < 24; i ++) {
var ampm = i >= 12 ? "PM" : "AM";
Please sign in to comment.
Something went wrong with that request. Please try again.