Skip to content

Commit 84bd7ab

Browse files
committed
appropriate TODO comment
1 parent a9c85f0 commit 84bd7ab

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/transforms/interval.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ import {isTemporal, labelof, map, maybeValue, valueof} from "../options.js";
33
import {maybeUtcInterval} from "../time.js";
44
import {maybeInsetX, maybeInsetY} from "./inset.js";
55

6-
// TODO Allow the interval to be specified as a string, e.g. “day” or “hour”?
7-
// This will require the interval knowing the type of the associated scale to
8-
// chose between UTC and local time (or better, an explicit timeZone option).
96
export function maybeInterval(interval) {
107
if (interval == null) return;
118
if (typeof interval === "number") {
@@ -17,8 +14,9 @@ export function maybeInterval(interval) {
1714
range: (lo, hi) => range(Math.ceil(lo / n), hi / n).map((x) => n * x)
1815
};
1916
}
17+
// TODO local time intervals (or better, an explicit timeZone option).
2018
if (typeof interval === "string") {
21-
return maybeUtcInterval(interval); // TODO local time intervals?
19+
return maybeUtcInterval(interval);
2220
}
2321
if (typeof interval.floor !== "function" || typeof interval.offset !== "function") {
2422
throw new Error("invalid interval; missing floor or offset method");

0 commit comments

Comments
 (0)