forked from d3/d3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'fix-time-dayOfYear' of git://github.com/jasondavies/d3 …
…into 2.9.7
- Loading branch information
Showing
4 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require("../env"); | ||
|
||
var vows = require("vows"), | ||
assert = require("assert"), | ||
time = require("./time"), | ||
local = time.local, | ||
utc = time.utc; | ||
|
||
var suite = vows.describe("d3.time.dayOfYear"); | ||
|
||
suite.addBatch({ | ||
"dayOfYear": { | ||
topic: function() { | ||
return d3.time.dayOfYear; | ||
}, | ||
"no floating-point rounding error": time.zone("America/Santiago", function(dayOfYear) { | ||
assert.equal(dayOfYear(new Date(2011, 4, 9)), 128); | ||
}) | ||
} | ||
}); | ||
|
||
suite.export(module); |