|
Last change
on this file was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
403 bytes
|
| Line | |
|---|
| 1 | import {timeInterval} from "./interval.js";
|
|---|
| 2 | import {durationSecond} from "./duration.js";
|
|---|
| 3 |
|
|---|
| 4 | export 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 |
|
|---|
| 14 | export const seconds = second.range;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.