source: Dev/trunk/d3/test/time/test-format-utc.js @ 76

Last change on this file since 76 was 76, checked in by fpvanagthoven, 14 years ago

d3

File size: 672 bytes
Line 
1require("./../../lib/env-js/envjs/node");
2require("./../../d3");
3require("./../../d3.time");
4
5var formats = [
6  "a",  "A",  "b",  "B",  "c",  "d",  "e",  "H", "I",  "j",  "m",  "M",
7  "p",  "S",  "U",  "w",  "W",  "x",  "X",  "y", "Y",  "Z",  "%"
8];
9
10var now = new Date(Date.UTC(1990, 0, 1));
11console.log("format 01/01/1990 00:00:00:");
12formats.forEach(function(f) {
13   console.log("  " + f + ":", d3.time.format.utc("%" + f)(now));
14});
15console.log("");
16
17var now = new Date(Date.UTC(2011, 11, 31, 23, 59, 59));
18console.log("format 12/31/2011 23:59:59:");
19formats.forEach(function(f) {
20   console.log("  " + f + ":", d3.time.format.utc("%" + f)(now));
21});
22console.log("");
Note: See TracBrowser for help on using the repository browser.