{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { type Locale } from \"./locales\";\n\nexport type DurationUnit =\n  | \"second\"\n  | \"minute\"\n  | \"hour\"\n  | \"day\"\n  | \"week\"\n  | \"month\"\n  | \"year\";\n\nexport type DatParametersObject = {\n  year?: number;\n  month?: number;\n  day?: number;\n  hour?: number;\n  minute?: number;\n  second?: number;\n  milliseconds?: number;\n};\n\nexport function isDatParametersObject(param: unknown): param is DatParametersObject {\n  return (\n    typeof param === \"object\" && param !== null && !(param instanceof Date)\n  );\n}\n\nexport type DateConstructorArgs =\n  | []\n  | [value: string | number | Date]\n  | [\n      year: number,\n      month: number,\n      day?: number,\n      hour?: number,\n      minute?: number,\n      second?: number,\n      milliseconds?: number,\n    ];\n\nexport class Dat extends Date {\n  constructor();\n  constructor(value: string | number | Date);\n  constructor(\n    year: number,\n    month: number,\n    day?: number,\n    hour?: number,\n    minute?: number,\n    second?: number,\n    milliseconds?: number,\n  );\n  constructor(params: DatParametersObject);\n  constructor(...args: [...DateConstructorArgs] | [DatParametersObject]) {\n    if (args.length === 0) {\n      super();\n    } else if (args.length === 1) {\n      if (isDatParametersObject(args[0])) {\n        const {\n          year = 0,\n          month = 0,\n          day = 0,\n          hour = 0,\n          minute = 0,\n          second = 0,\n          milliseconds = 0,\n        } = args[0];\n        super(year, month, day, hour, minute, second, milliseconds);\n      } else {\n        super(args[0]);\n      }\n    } else {\n      super(...args);\n    }\n  }\n\n  /**\n   * Adds the specified number of seconds to this date.\n   * @param {number} seconds - The number of seconds to add.\n   * @returns {Dat} - A new Dat instance with the seconds added.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.addSeconds(30);\n   * console.log(result.toISOString()); // \"2023-01-01T12:00:30.000Z\"\n   */\n  addSeconds(seconds: number): Dat {\n    const result = new Dat(this);\n    result.setSeconds(result.getSeconds() + seconds);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of seconds from this date.\n   * @param {number} seconds - The number of seconds to subtract.\n   * @returns {Dat} - A new Dat instance with the seconds subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.substractSeconds(30);\n   * console.log(result.toISOString()); // \"2023-01-01T11:59:30.000Z\"\n   */\n  substractSeconds(seconds: number): Dat {\n    return this.addSeconds(-seconds);\n  }\n\n  /**\n   * Adds the specified number of minutes to this date.\n   * @param {number} minutes - The number of minutes to add.\n   * @returns {Dat} - A new Dat instance with the minutes added.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.addMinutes(15);\n   * console.log(result.toISOString()); // \"2023-01-01T12:15:00.000Z\"\n   */\n  addMinutes(minutes: number): Dat {\n    const result = new Dat(this);\n    result.setMinutes(result.getMinutes() + minutes);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of minutes from this date.\n   * @param {number} minutes - The number of minutes to subtract.\n   * @returns {Dat} - A new Dat instance with the minutes subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.substractMinutes(15);\n   * console.log(result.toISOString()); // \"2023-01-01T11:45:00.000Z\"\n   */\n  substractMinutes(minutes: number): Dat {\n    return this.addMinutes(-minutes);\n  }\n\n  /**\n   * Adds the specified number of hours to this date.\n   * @param {number} hours - The number of hours to add.\n   * @returns {Dat} - A new Dat instance with the hours added.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.addHours(2);\n   * console.log(result.toISOString()); // \"2023-01-01T14:00:00.000Z\"\n   */\n  addHours(hours: number): Dat {\n    const result = new Dat(this);\n    result.setHours(result.getHours() + hours);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of hours from this date.\n   * @param {number} hours - The number of hours to subtract.\n   * @returns {Dat} - A new Dat instance with the hours subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * const result = date.substractHours(2);\n   * console.log(result.toISOString()); // \"2023-01-01T10:00:00.000Z\"\n   */\n  substractHours(hours: number): Dat {\n    return this.addHours(-hours);\n  }\n\n  /**\n   * Adds the specified number of days to this date.\n   * @param {number} days - The number of days to add.\n   * @returns {Dat} - A new Dat instance with the days added.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.addDays(3);\n   * console.log(result.toISOString()); // \"2023-01-04T00:00:00.000Z\"\n   */\n  addDays(days: number): Dat {\n    const result = new Dat(this);\n    result.setDate(result.getDate() + days);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of days from this date.\n   * @param {number} days - The number of days to subtract.\n   * @returns {Dat} - A new Dat instance with the days subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.substractDays(3);\n   * console.log(result.toISOString()); // \"2022-12-29T00:00:00.000Z\"\n   */\n  substractDays(days: number): Dat {\n    return this.addDays(-days);\n  }\n\n  /**\n   * Adds the specified number of weeks to this date.\n   * @param {number} weeks - The number of weeks to add.\n   * @returns {Dat} - A new Dat instance with the weeks added.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.addWeeks(2);\n   * console.log(result.toISOString()); // \"2023-01-15T00:00:00.000Z\"\n   */\n  addWeeks(weeks: number): Dat {\n    const millisecondsInWeek = 7 * 24 * 60 * 60 * 1000;\n    return new Dat(this.getTime() + weeks * millisecondsInWeek);\n  }\n\n  /**\n   * Adds the specified number of months to this date.\n   * @param {number} months - The number of months to add.\n   * @returns {Dat} - A new Dat instance with the months added.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.addMonths(3);\n   * console.log(result.toISOString()); // \"2023-04-01T00:00:00.000Z\"\n   */\n  addMonths(months: number): Dat {\n    const result = new Dat(this);\n    result.setMonth(result.getMonth() + months);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of months from this date.\n   * @param {number} months - The number of months to subtract.\n   * @returns {Dat} - A new Dat instance with the months subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.substractMonths(3);\n   * console.log(result.toISOString()); // \"2022-10-01T00:00:00.000Z\"\n   */\n  substractMonths(months: number): Dat {\n    return this.addMonths(-months);\n  }\n\n  /**\n   * Adds the specified number of years to this date.\n   * @param {number} years - The number of years to add.\n   * @returns {Dat} - A new Dat instance with the years added.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.addYears(5);\n   * console.log(result.toISOString()); // \"2028-01-01T00:00:00.000Z\"\n   */\n  addYears(years: number): Dat {\n    const result = new Dat(this);\n    result.setFullYear(result.getFullYear() + years);\n    return result;\n  }\n\n  /**\n   * Subtracts the specified number of years from this date.\n   * @param {number} years - The number of years to subtract.\n   * @returns {Dat} - A new Dat instance with the years subtracted.\n   * @example\n   * const date = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const result = date.substractYears(5);\n   * console.log(result.toISOString()); // \"2018-01-01T00:00:00.000Z\"\n   */\n  substractYears(years: number): Dat {\n    return this.addYears(-years);\n  }\n\n  /**\n   * Calculates the duration between this date and another date in the specified unit.\n   * @param {Date | Dat} compareTo - The date to compare to.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   * @example\n   * const a = new Dat(\"2023-01-01T00:00:00.000Z\");\n   * const b = new Dat(\"2023-01-01T01:00:00.000Z\");\n   * console.log(a.diff(b, \"hour\")); // 1\n   */\n  diff(compareTo: Date | Dat, unit: DurationUnit): number {\n    return Dat.diff(this, compareTo, unit);\n  }\n\n  /**\n   * Checks if this date comes after the provided date.\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @returns {boolean} True if this date is after compareTo, false otherwise.\n   * @example\n   * const date = new Dat(\"2022-01-02\");\n   * console.log(date.isAfter(new Dat(\"2022-01-01\"))); // true\n   */\n  isAfter(compareTo: Date | Dat): boolean {\n    return Dat.isAfter(this, compareTo);\n  }\n\n  /**\n   * Checks if this date comes before the provided date.\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @returns {boolean} True if this date is before compareTo, false otherwise.\n   * @example\n   * const date = new Dat(\"2022-01-01\");\n   * console.log(date.isBefore(new Dat(\"2022-01-02\"))); // true\n   */\n  isBefore(compareTo: Date | Dat): boolean {\n    return Dat.isBefore(this, compareTo);\n  }\n\n  /**\n   * Checks if this date is the same as the provided date (same timestamp).\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @returns {boolean} True if both dates are the same, false otherwise.\n   * @example\n   * const date = new Dat(\"2022-01-01\");\n   * console.log(date.isSame(new Dat(\"2022-01-01\"))); // true\n   */\n  isSame(compareTo: Date | Dat): boolean {\n    return Dat.isSame(this, compareTo);\n  }\n\n  /**\n   * Checks if this date's year is a leap year.\n   * @returns {boolean} True if the year is a leap year, false otherwise.\n   * @example\n   * const date = new Dat(\"2024-01-01\");\n   * console.log(date.isLeapYear()); // true\n   * const date2 = new Dat(\"2023-01-01\");\n   * console.log(date2.isLeapYear()); // false\n   */\n  isLeapYear(): boolean {\n    return Dat.isLeapYear(this);\n  }\n\n  /**\n   * Checks if this date is a working day (Monday to Friday).\n   * @returns {boolean} True if the date is a working day, false otherwise.\n   * @example\n   * const weekday = new Dat(\"2024-01-15\"); // Monday\n   * console.log(weekday.isWorkingDay()); // true\n   * const weekend = new Dat(\"2024-01-13\"); // Saturday\n   * console.log(weekend.isWorkingDay()); // false\n   */\n  isWorkingDay(): boolean {\n    return Dat.isWorkingDay(this);\n  }\n\n  /**\n   * Checks if this date is a weekend (Saturday or Sunday).\n   * @returns {boolean} True if the date is a weekend, false otherwise.\n   * @example\n   * const weekend = new Dat(\"2024-01-13\"); // Saturday\n   * console.log(weekend.isWeekend()); // true\n   * const weekday = new Dat(\"2024-01-15\"); // Monday\n   * console.log(weekday.isWeekend()); // false\n   */\n  isWeekend(): boolean {\n    return Dat.isWeekend(this);\n  }\n\n  /**\n   * Checks if this date has the same unit value as the provided date.\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @param {DurationUnit} unit - The unit to compare.\n   * @returns {boolean} True if both dates share the same unit value.\n   * @example\n   * const date = new Dat(\"2022-01-01\");\n   * console.log(date.hasSame(new Dat(\"2022-01-02\"), \"month\")); // true\n   */\n  hasSame(compareTo: Date | Dat, unit: DurationUnit): boolean {\n    return Dat.hasSame(this, compareTo, unit);\n  }\n\n  /**\n   * Checks if this date's unit value comes before the provided date's unit value.\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @param {DurationUnit} unit - The unit to compare.\n   * @returns {boolean} True if this date is before compareTo for the specified unit.\n   * @example\n   * const date = new Dat(\"2022-01-01\");\n   * console.log(date.hasBefore(new Dat(\"2022-01-02\"), \"day\")); // true\n   */\n  hasBefore(compareTo: Date | Dat, unit: DurationUnit): boolean {\n    return Dat.hasBefore(this, compareTo, unit);\n  }\n\n  /**\n   * Checks if this date's unit value comes after the provided date's unit value.\n   * @param {Date | Dat} compareTo - The date to compare against.\n   * @param {DurationUnit} unit - The unit to compare.\n   * @returns {boolean} True if this date is after compareTo for the specified unit.\n   * @example\n   * const date = new Dat(\"2022-01-02\");\n   * console.log(date.hasAfter(new Dat(\"2022-01-01\"), \"day\")); // true\n   */\n  hasAfter(compareTo: Date | Dat, unit: DurationUnit): boolean {\n    return Dat.hasAfter(this, compareTo, unit);\n  }\n\n  /**\n   * Calculates the duration from now to this date in the specified unit.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   * @example\n   * const date = new Dat();\n   * console.log(date.addMonths(3).fromNow(\"month\"));\n   */\n  fromNow(unit: DurationUnit): number {\n    return Dat.durationFromNow(this, unit);\n  }\n\n  /**\n   * Calculates the duration from this date to now in the specified unit.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   * @example\n   * const date = new Dat();\n   * console.log(date.substractMonths(3).untilNow(\"month\"));\n   */\n  untilNow(unit: DurationUnit): number {\n    return Dat.durationToNow(this, unit);\n  }\n\n  /**\n   * Formats this date using Intl.DateTimeFormat with the specified locale and options.\n   * @param {Intl.DateTimeFormatOptions & { locale?: Locale }} [options] - Optional Intl.DateTimeFormat options and locale.\n   * @returns {string} - The formatted date string.\n   * @example\n   * const date = new Dat(\"2023-01-01T12:00:00.000Z\");\n   * console.log(date.formatDate({ dateStyle: \"medium\", timeStyle: \"medium\" }));\n   */\n  formatDate(\n    options: Intl.DateTimeFormatOptions & { locale?: Locale } = {\n      locale: \"en-US\",\n    },\n  ): string {\n    return Dat.formatDate(this, options);\n  }\n\n  /**\n   * Calculates the duration from now to a future date in the specified unit.\n   * @param {Date} futureDate - The future date to compare against the current date.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   */\n  static durationFromNow(futureDate: Date, unit: DurationUnit): number {\n    const now = new Date();\n    return this.diff(now, futureDate, unit);\n  }\n\n  /**\n   * Calculates the duration from a past date to now in the specified unit.\n   * @param {Date} pastDate - The past date to compare against the current date.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   */\n  static durationToNow(pastDate: Date, unit: DurationUnit): number {\n    const now = new Date();\n    return this.diff(pastDate, now, unit);\n  }\n\n  /**\n   * Formats a date using Intl.DateTimeFormat with the specified locale and options.\n   * @param {Date} date - The date to format.\n   * @param {Intl.DateTimeFormatOptions & { locale?: Locale }} [options] - Optional Intl.DateTimeFormat options for custom formatting and locale code (e.g., 'en-US' or 'fr-FR').\n   * @returns {string} - The formatted date string.\n   * @example\n   * const formattedDate = Dat.formatDate(new Date(), { dateStyle: 'long', locale: 'fr-FR' });\n   * console.log(formattedDate); // e.g., \"30 Octobre, 2023\"\n   */\n\n  static formatDate(\n    date: Date,\n    options: Intl.DateTimeFormatOptions & { locale?: Locale } = {\n      locale: \"en-US\",\n    },\n  ): string {\n    const { locale, ...restOptions } = options;\n\n    return new Intl.DateTimeFormat(locale, restOptions).format(date);\n  }\n\n  /**\n   * Formats a duration using Intl.RelativeTimeFormat and formatToParts.\n   * @param {number} value - The duration value (positive or negative).\n   * @param {DurationUnit} unit - The unit of time for the duration.\n   * @param {Intl.RelativeTimeFormatOptions & { locale?: Locale }} [options] - Options for Intl.RelativeTimeFormat and the locale for formatting.\n   * @returns {string} - The formatted duration string.\n   * @example\n   * const durationString = Dat.formatDuration(-2, 'day', 'fr-FR');\n   * console.log(durationString); // e.g., \"il y a 2 jours\" (French locale)\n   */\n  static formatDuration(\n    value: number,\n    unit: DurationUnit,\n    options: Intl.RelativeTimeFormatOptions & { locale?: Locale } = {\n      locale: \"en-US\",\n    },\n  ): string {\n    const { locale, ...restOptions } = options;\n    const rtf = new Intl.RelativeTimeFormat(locale, restOptions);\n    const parts = rtf.formatToParts(value, unit);\n\n    // Combine the parts to form the final formatted string\n    return parts.map((part) => part.value).join(\"\");\n  }\n\n  /**\n   * Helper function to calculate the duration between two dates in the specified unit.\n   * Uses a map to retrieve the appropriate calculation function.\n   * @param {Date} firstDate - The first date for the duration calculation.\n   * @param {Date} secondDate - The second date for the duration calculation.\n   * @param {DurationUnit} unit - The unit of time to return the duration in.\n   * @returns {number} - The duration in the specified unit.\n   * @example\n   * const daysBetween = Dat.diff(new Date('2023-01-01'), new Date('2023-01-03'), 'day'); // Returns 2\n   */\n  static diff(\n    firstDate: Date | Dat,\n    secondDate: Date | Dat,\n    unit: DurationUnit,\n  ): number {\n    let result: number;\n    switch (unit) {\n      case \"second\":\n        result = (secondDate.getTime() - firstDate.getTime()) / 1000;\n        break;\n      case \"minute\":\n        result = (secondDate.getTime() - firstDate.getTime()) / (60 * 1000);\n        break;\n      case \"hour\":\n        result =\n          (secondDate.getTime() - firstDate.getTime()) / (60 * 60 * 1000);\n        break;\n      case \"day\":\n        result =\n          (secondDate.getTime() - firstDate.getTime()) / (24 * 60 * 60 * 1000);\n        break;\n      case \"week\":\n        result =\n          (secondDate.getTime() - firstDate.getTime()) /\n          (7 * 24 * 60 * 60 * 1000);\n        break;\n      case \"month\":\n        result =\n          (secondDate.getFullYear() - firstDate.getFullYear()) * 12 +\n          (secondDate.getMonth() - firstDate.getMonth());\n        break;\n      case \"year\":\n        result = secondDate.getFullYear() - firstDate.getFullYear();\n        break;\n      default:\n        throw new Error(`Unknown unit: ${unit}`);\n    }\n\n    const formattedResult = result.toFixed(2);\n    return Number(formattedResult);\n  }\n\n  // Dates comparaison methods\n\n  /**\n   * Checks if the first date comes after the second date.\n   * @param {Date} firstDate The date to check.\n   * @param {Date} secondDate The date to compare against.\n   * @returns {boolean} True if firstDate comes after secondDate, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(isAfter(date1, date2)); // false\n   * console.log(isAfter(date2, date1)); // true\n   */\n  static isAfter(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() > secondDate.getTime();\n  }\n\n  /**\n   * Checks if the first date comes before the second date.\n   * @param {Date} firstDate The date to check.\n   * @param {Date} secondDate The date to compare against.\n   * @returns {boolean} True if firstDate comes before secondDate, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(isBefore(date1, date2)); // true\n   * console.log(isBefore(date2, date1)); // false\n   */\n  static isBefore(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() < secondDate.getTime();\n  }\n\n  /**\n   * Checks if two dates are the same.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @returns {boolean} True if the two dates are the same, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-01');\n   * console.log(isSame(date1, date2)); // true\n   * const date3 = new Date('2022-01-02');\n   * console.log(isSame(date1, date3)); // false\n   */\n  static isSame(firstDate: Date, secondDate: Date): boolean {\n    return firstDate.getTime() === secondDate.getTime();\n  }\n\n  /**\n   * Checks if the given year is a leap year.\n   * @param {Date} date - The date to check.\n   * @returns {boolean} True if the year is a leap year, false otherwise.\n   * @example\n   * const date = new Date('2024-01-01');\n   * console.log(Dat.isLeapYear(date)); // true\n   * const date2 = new Date('2023-01-01');\n   * console.log(Dat.isLeapYear(date2)); // false\n   */\n  static isLeapYear(date: Date): boolean {\n    const year = date.getFullYear();\n    return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n  }\n  \n  /**\n   * Checks if the given date is a working day (Monday to Friday).\n   * @param {Date} date - The date to check.\n   * @returns {boolean} True if the date is a working day, false otherwise.\n   * @example\n   * const monday = new Date('2023-01-02'); // Monday\n   * console.log(Dat.isWorkingDay(monday)); // true\n   * const saturday = new Date('2023-01-07'); // Saturday\n   * console.log(Dat.isWorkingDay(saturday)); // false\n   */\n  static isWorkingDay(date: Date): boolean {\n    const day = date.getDay();\n    return day !== 0 && day !== 6;\n  }\n\n  /**\n   * Checks if the given date is a weekend (Saturday or Sunday).\n   * @param {Date} date - The date to check.\n   * @returns {boolean} True if the date is a weekend, false otherwise.\n   * @example\n   * const saturday = new Date('2023-01-07'); // Saturday\n   * console.log(Dat.isWeekend(saturday)); // true\n   * const monday = new Date('2023-01-02'); // Monday\n   * console.log(Dat.isWeekend(monday)); // false\n   */\n  static isWeekend(date: Date): boolean {\n    const day = date.getDay();\n    return day === 0 || day === 6;\n  }\n\n  /**\n   * Checks if two dates have the same value based on the specified unit.\n   *\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the two dates have the same value for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasSame(date1, date2, 'month')); // true\n   * console.log(hasSame(date1, date2, 'day')); // false\n   * console.log(hasSame(date1, date2, 'week')); // true\n   */\n  static hasSame(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit,\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() === secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() === secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() === secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() === secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() === secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() === secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() ===\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  /**\n   * Checks if the unit value of the first date comes before the unit value of the second date.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the first date comes before the second date for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasBefore(date1, date2, 'day')); // true\n   * console.log(hasBefore(date1, date2, 'month')); // false\n   */\n  static hasBefore(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit,\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() < secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() < secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() < secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() < secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() < secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() < secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() <\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  /**\n   * Checks if the unit value of the first date comes after the unit value of the second date.\n   * @param {Date} firstDate The first date to compare.\n   * @param {Date} secondDate The second date to compare.\n   * @param {DurationUnit} unit The unit to compare.\n   * @returns {boolean} True if the first date comes after the second date for the specified unit, false otherwise.\n   * @example\n   * const date1 = new Date('2022-01-01');\n   * const date2 = new Date('2022-01-02');\n   * console.log(hasAfter(date1, date2, 'day')); // false\n   * console.log(hasAfter(date1, date2, 'month')); // false\n   */\n  static hasAfter(\n    firstDate: Date,\n    secondDate: Date,\n    unit: DurationUnit,\n  ): boolean {\n    switch (unit) {\n      case \"year\":\n        return firstDate.getFullYear() > secondDate.getFullYear();\n      case \"month\":\n        return firstDate.getMonth() > secondDate.getMonth();\n      case \"day\":\n        return firstDate.getDate() > secondDate.getDate();\n      case \"hour\":\n        return firstDate.getHours() > secondDate.getHours();\n      case \"minute\":\n        return firstDate.getMinutes() > secondDate.getMinutes();\n      case \"second\":\n        return firstDate.getSeconds() > secondDate.getSeconds();\n      case \"week\":\n        const firstDayOfWeek = (date: Date) => {\n          const dayOfWeek = date.getDay() || 7;\n          if (dayOfWeek === 1) {\n            return date;\n          } else {\n            const diff = date.getDate() - dayOfWeek + 1;\n            return new Date(date.setDate(diff));\n          }\n        };\n        return (\n          firstDayOfWeek(firstDate).getTime() >\n          firstDayOfWeek(secondDate).getTime()\n        );\n      default:\n        throw new Error(`Invalid unit: ${unit}`);\n    }\n  }\n\n  // Time manipulation helper methods\n\n  /**\n   * Adds the specified number of seconds to the given date.\n   * @param {Date} date - The date to add seconds to.\n   * @param {number} seconds - The number of seconds to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addSeconds(new Date(), 30);\n   * console.log(result); // e.g., \"2023-01-01T00:00:30.000Z\"\n   */\n  static addSeconds(date: Date, seconds: number): Date {\n    const result = new Date(date);\n    result.setSeconds(result.getSeconds() + seconds);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of minutes to the given date.\n   * @param {Date} date - The date to add minutes to.\n   * @param {number} minutes - The number of minutes to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addMinutes(new Date(), 22);\n   * console.log(result); // e.g., \"2023-01-01T00:22:00.000Z\"\n   */\n  static addMinutes(date: Date, minutes: number): Date {\n    const result = new Date(date);\n    result.setMinutes(result.getMinutes() + minutes);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of hours to the given date.\n   * @param {Date} date - The date to add hours to.\n   * @param {number} hours - The number of hours to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addHours(new Date(), 4);\n   * console.log(result); // e.g., \"2023-01-01T04:00:00.000Z\"\n   */\n  static addHours(date: Date, hours: number): Date {\n    const result = new Date(date);\n    result.setHours(result.getHours() + hours);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of days to the given date.\n   * @param {Date} date - The date to add days to.\n   * @param {number} days - The number of days to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addDays(new Date('2023-01-01'), 2);\n   * console.log(result); // e.g., \"2023-01-03T00:00:00.000Z\"\n   */\n  static addDays(date: Date, days: number): Date {\n    const result = new Date(date);\n    result.setDate(result.getDate() + days);\n    return result;\n  }\n\n  /**\n   * Adds a specified number of weeks to a given date.\n   *\n   * @param {Date} date - The date to which the weeks will be added.\n   * @param {number} weeks - The number of weeks to add.\n   * @returns {Date} - The new date after adding the specified number of weeks.\n   *\n   * @example\n   * const newDate = addWeeks(new Date('2022-01-01'), 2);\n   * console.log(newDate); // \"2022-01-15\"\n   */\n  static addWeeks(date: Date, weeks: number): Date {\n    const millisecondsInWeek = 7 * 24 * 60 * 60 * 1000;\n    const newDate = new Date(date.getTime() + weeks * millisecondsInWeek);\n    return newDate;\n  }\n\n  /**\n   * Adds the specified number of months to the given date.\n   * @param {Date} date - The date to add months to.\n   * @param {number} months - The number of months to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addMonths(new Date('2023-01-01'), 3);\n   * console.log(result); // e.g., \"2023-04-01T00:00:00.000Z\"\n   */\n  static addMonths(date: Date, months: number): Date {\n    const result = new Date(date);\n    result.setMonth(result.getMonth() + months);\n    return result;\n  }\n\n  /**\n   * Adds the specified number of years to the given date.\n   * @param {Date} date - The date to add years to.\n   * @param {number} years - The number of years to add.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.addYears(new Date('2023-01-01'), 2);\n   * console.log(result); // e.g., \"2025-01-01T00:00:00.000Z\"\n   */\n  static addYears(date: Date, years: number): Date {\n    const result = new Date(date);\n    result.setFullYear(result.getFullYear() + years);\n    return result;\n  }\n\n  /**\n   * Substracts the specified number of seconds from the given date.\n   * @param {Date} date - The date to substract seconds from.\n   * @param {number} seconds - The number of seconds to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractSeconds(new Date('2023-01-01T12:00:00.000Z'), 30);\n   * console.log(result); // e.g., \"2023-01-01T11:59:30.000Z\"\n   */\n  static substractSeconds(date: Date, seconds: number): Date {\n    return Dat.addSeconds(date, -seconds);\n  }\n\n  /**\n   * Substracts the specified number of minutes from the given date.\n   * @param {Date} date - The date to substract minutes from.\n   * @param {number} minutes - The number of minutes to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractMinutes(new Date('2023-01-01T12:00:00.000Z'), 15);\n   * console.log(result); // e.g., \"2023-01-01T11:45:00.000Z\"\n   */\n  static substractMinutes(date: Date, minutes: number): Date {\n    return Dat.addMinutes(date, -minutes);\n  }\n\n  /**\n   * Substracts the specified number of hours from the given date.\n   * @param {Date} date - The date to substract hours from.\n   * @param {number} hours - The number of hours to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractHours(new Date('2023-01-01T12:00:00.000Z'), 2);\n   * console.log(result); // e.g., \"2023-01-01T10:00:00.000Z\"\n   */\n  static substractHours(date: Date, hours: number): Date {\n    return Dat.addHours(date, -hours);\n  }\n\n  /**\n   * Substracts the specified number of days from the given date.\n   * @param {Date} date - The date to substract days from.\n   * @param {number} days - The number of days to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractDays(new Date('2023-01-01T00:00:00.000Z'), 3);\n   * console.log(result); // e.g., \"2022-12-29T00:00:00.000Z\"\n   */\n  static substractDays(date: Date, days: number): Date {\n    return Dat.addDays(date, -days);\n  }\n\n  /**\n   * Substracts the specified number of weeks from the given date.\n   * @param {Date} date - The date to substract weeks from.\n   * @param {number} weeks - The number of weeks to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractWeeks(new Date('2023-01-01T00:00:00.000Z'), 2);\n   * console.log(result); // e.g., \"2022-12-18T00:00:00.000Z\"\n   */\n  static substractWeeks(date: Date, weeks: number): Date {\n    return Dat.addWeeks(date, -weeks);\n  }\n\n  /**\n   * Substracts the specified number of months from the given date.\n   * @param {Date} date - The date to substract months from.\n   * @param {number} months - The number of months to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractMonths(new Date('2023-01-01T00:00:00.000Z'), 3);\n   * console.log(result); // e.g., \"2022-10-01T00:00:00.000Z\"\n   */\n  static substractMonths(date: Date, months: number): Date {\n    return Dat.addMonths(date, -months);\n  }\n\n  /**\n   * Substracts the specified number of years from the given date.\n   * @param {Date} date - The date to substract years from.\n   * @param {number} years - The number of years to substract.\n   * @returns {Date} - The resulting date object.\n   * @example\n   * const result = Dat.substractYears(new Date('2023-01-01T00:00:00.000Z'), 5);\n   * console.log(result); // e.g., \"2018-01-01T00:00:00.000Z\"\n   */\n  static substractYears(date: Date, years: number): Date {\n    return Dat.addYears(date, -years);\n  }\n\n  // Duration calculation helper methods\n\n  /**\n   * Calculates the number of seconds between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of seconds between the two dates.\n   * @example\n   * const seconds = Dat.secondsBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T00:01:40Z'));\n   * console.log(seconds); // 100\n   */\n  static secondsBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"second\"));\n  }\n\n  /**\n   * Calculates the number of minutes between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of minutes between the two dates.\n   * @example\n   * const minutes = Dat.minutesBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T00:01:40Z'));\n   * console.log(minutes); // 1.67\n   */\n  static minutesBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"minute\"));\n  }\n\n  /**\n   * Calculates the number of hours between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of hours between the two dates.\n   * @example\n   * const hours = Dat.hoursBetween(new Date('2023-01-01T00:00:00Z'), new Date('2023-01-01T01:40:00Z'));\n   * console.log(hours); // 1.67\n   */\n  static hoursBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"hour\"));\n  }\n\n  /**\n   * Calculates the number of days between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of days between the two dates.\n   * @example\n   * const days = Dat.daysBetween(new Date('2023-01-01'), new Date('2023-01-03'));\n   * console.log(days); // 2\n   */\n  static daysBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"day\"));\n  }\n\n  /**\n   * Calculates the number of weeks between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of weeks between the two dates.\n   * @example\n   * const weeks = Dat.weeksBetween(new Date('2023-01-01'), new Date('2023-01-15'));\n   * console.log(weeks); // 2\n   */\n  static weeksBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"week\"));\n  }\n\n  /**\n   * Calculates the number of months between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of months between the two dates.\n   * @example\n   * const months = Dat.monthsBetween(new Date('2023-01-01'), new Date('2023-03-01'));\n   * console.log(months); // 2\n   */\n  static monthsBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"month\"));\n  }\n\n  /**\n   * Calculates the number of years between two dates.\n   * @param {Date} firstDate - The first date for the calculation.\n   * @param {Date} secondDate - The second date for the calculation.\n   * @returns {number} - The number of years between the two dates.\n   * @example\n   * const years = Dat.yearsBetween(new Date('2020-01-01'), new Date('2023-01-01'));\n   * console.log(years); // 3\n   */\n  static yearsBetween(firstDate: Date, secondDate: Date): number {\n    return Math.abs(Dat.diff(firstDate, secondDate, \"year\"));\n  }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,sBAAsB,OAA8C;AAClF,SACE,OAAO,UAAU,YAAY,UAAU,QAAQ,EAAE,iBAAiB;AAEtE;AAeO,IAAM,MAAN,MAAM,aAAY,KAAK;AAAA,EAa5B,eAAe,MAAwD;AACrE,QAAI,KAAK,WAAW,GAAG;AACrB,YAAM;AAAA,IACR,WAAW,KAAK,WAAW,GAAG;AAC5B,UAAI,sBAAsB,KAAK,CAAC,CAAC,GAAG;AAClC,cAAM;AAAA,UACJ,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,MAAM;AAAA,UACN,OAAO;AAAA,UACP,SAAS;AAAA,UACT,SAAS;AAAA,UACT,eAAe;AAAA,QACjB,IAAI,KAAK,CAAC;AACV,cAAM,MAAM,OAAO,KAAK,MAAM,QAAQ,QAAQ,YAAY;AAAA,MAC5D,OAAO;AACL,cAAM,K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