forked from bigeasy/timezone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
days.t.js
executable file
·21 lines (20 loc) · 1.01 KB
/
days.t.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env node
require("../../proof")(14, function (tz, equal) {
var tz = tz(require("timezone/en_US"));
// en_US abbreviated days of week
equal(tz("2006-01-01", "%a", "en_US"), "Sun", "Sun");
equal(tz("2006-01-02", "%a", "en_US"), "Mon", "Mon");
equal(tz("2006-01-03", "%a", "en_US"), "Tue", "Tue");
equal(tz("2006-01-04", "%a", "en_US"), "Wed", "Wed");
equal(tz("2006-01-05", "%a", "en_US"), "Thu", "Thu");
equal(tz("2006-01-06", "%a", "en_US"), "Fri", "Fri");
equal(tz("2006-01-07", "%a", "en_US"), "Sat", "Sat");
// en_US days of week
equal(tz("2006-01-01", "%A", "en_US"), "Sunday", "Sunday");
equal(tz("2006-01-02", "%A", "en_US"), "Monday", "Monday");
equal(tz("2006-01-03", "%A", "en_US"), "Tuesday", "Tuesday");
equal(tz("2006-01-04", "%A", "en_US"), "Wednesday", "Wednesday");
equal(tz("2006-01-05", "%A", "en_US"), "Thursday", "Thursday");
equal(tz("2006-01-06", "%A", "en_US"), "Friday", "Friday");
equal(tz("2006-01-07", "%A", "en_US"), "Saturday", "Saturday");
});