import { timeInterval } from "./interval.js";
import { durationDay, durationMinute } from "./duration.js";
const timeDay = timeInterval((e) => e.setHours(0, 0, 0, 0), (e, r) => e.setDate(e.getDate() + r), (e, a) => (a - e - (a.getTimezoneOffset() - e.getTimezoneOffset()) * durationMinute) / durationDay, (e) => e.getDate() - 1);
timeDay.range;
const utcDay = timeInterval((e) => {
	e.setUTCHours(0, 0, 0, 0);
}, (e, r) => {
	e.setUTCDate(e.getUTCDate() + r);
}, (e, i) => (i - e) / durationDay, (e) => e.getUTCDate() - 1);
utcDay.range;
const unixDay = timeInterval((e) => {
	e.setUTCHours(0, 0, 0, 0);
}, (e, r) => {
	e.setUTCDate(e.getUTCDate() + r);
}, (e, i) => (i - e) / durationDay, (e) => Math.floor(e / durationDay));
unixDay.range;
export { timeDay, unixDay, utcDay };
