Commit 33d9034a authored by Minwei Xu's avatar Minwei Xu
Browse files

chinese

parent b1ea756a
......@@ -5,8 +5,8 @@ var d3_locale_zhCN = d3.locale({
thousands: ",",
grouping: [3],
currency: ["¥", ""],
dateTime: "%Y %b %e %a %X",
date: "%Y/%-m/%-d",
dateTime: "%x %A %X",
date: "%Y%-m%-d",
time: "%H:%M:%S",
periods: ["上午", "下午"],
days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
......
......@@ -36,11 +36,11 @@ suite.addBatch({
"format": {
"formats locale date and time": function(format) {
var f = format("%c");
assert.equal(f(local(1990, 0, 1)), "1990 一月 1 周一 00:00:00");
assert.equal(f(local(1990, 0, 1)), "1990年1月1日 星期一 00:00:00");
},
"formats locale date": function(format) {
var f = format("%x");
assert.equal(f(local(1990, 0, 1)), "1990/1/1");
assert.equal(f(local(1990, 0, 1)), "1990年1月1日");
},
"formats locale time": function(format) {
var f = format("%X");
......@@ -106,11 +106,11 @@ suite.addBatch({
"parse": {
"parses locale date and time": function(format) {
var p = format("%c").parse;
assert.deepEqual(p("1990 一月 1 周一 00:00:00"), local(1990, 0, 1));
assert.deepEqual(p("1990年1月1日 星期一 00:00:00"), local(1990, 0, 1));
},
"parses locale date": function(format) {
var p = format("%x").parse;
assert.deepEqual(p("1990/1/1"), local(1990, 0, 1));
assert.deepEqual(p("1990年1月1日"), local(1990, 0, 1));
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment