Library API
    Preparing search index...

    Function shiftDateByDays

    • Shifts a Date by an exact number of 24-hour days (86,400,000 ms per day).

      Parameters

      • date: Date

        The baseline Date instance

      • days: number

        Number of 24-hour days to add (can be negative)

      Returns Date

      A new Date instance offset by the specified number of 24-hour periods

      This function performs fixed-duration timestamp arithmetic in UTC. It is non-mutating and allocation-light.

      DST / Wall-Clock Warning: Because this applies a fixed 86,400,000 ms offset, it does NOT adjust for Daylight Saving Time (DST) wall-clock shifts in local timezones (e.g. 23-hour or 25-hour days). If wall-clock preservation across DST transitions in a specific timezone is required, use timezone-aware calendar arithmetic (such as Temporal or tempo-fns).