source: node_modules/d3-time/src/second.js@ ba17441

Last change on this file since ba17441 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 403 bytes
Line 
1import {timeInterval} from "./interval.js";
2import {durationSecond} from "./duration.js";
3
4export const second = timeInterval((date) => {
5 date.setTime(date - date.getMilliseconds());
6}, (date, step) => {
7 date.setTime(+date + step * durationSecond);
8}, (start, end) => {
9 return (end - start) / durationSecond;
10}, (date) => {
11 return date.getUTCSeconds();
12});
13
14export const seconds = second.range;
Note: See TracBrowser for help on using the repository browser.