Download node_modules/d3-time/src/second.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-time/src/second.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-time/src/second.js
-
curl -L -o second.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-time/src/second.js
403 Bytes
| import {timeInterval} from "./interval.js"; | |
| import {durationSecond} from "./duration.js"; | |
| export const second = timeInterval((date) => { | |
| date.setTime(date - date.getMilliseconds()); | |
| }, (date, step) => { | |
| date.setTime(+date + step * durationSecond); | |
| }, (start, end) => { | |
| return (end - start) / durationSecond; | |
| }, (date) => { | |
| return date.getUTCSeconds(); | |
| }); | |
| export const seconds = second.range; | |