"use client";
import { timeInterval as l } from "./interval.js";
const u = l((e) => {
  e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, r) => {
  e.setFullYear(e.getFullYear() + r);
}, (e, r) => r.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
u.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : l((r) => {
  r.setFullYear(Math.floor(r.getFullYear() / e) * e), r.setMonth(0, 1), r.setHours(0, 0, 0, 0);
}, (r, t) => {
  r.setFullYear(r.getFullYear() + t * e);
});
u.range;
const s = l((e) => {
  e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, r) => {
  e.setUTCFullYear(e.getUTCFullYear() + r);
}, (e, r) => r.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
s.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : l((r) => {
  r.setUTCFullYear(Math.floor(r.getUTCFullYear() / e) * e), r.setUTCMonth(0, 1), r.setUTCHours(0, 0, 0, 0);
}, (r, t) => {
  r.setUTCFullYear(r.getUTCFullYear() + t * e);
});
s.range;
export {
  u as timeYear,
  s as utcYear
};
