Simple Date & Time Calculator — Convert, Difference, and Add Time

Advanced Date & Time Calculator with Recurring and Workday Options

Features

  • Add/Subtract Dates & Times: Add or subtract years, months, weeks, days, hours, minutes, seconds to a given date-time.
  • Recurring Events: Create recurring schedules (daily, weekly, monthly, yearly) with options for interval (every 2 weeks), end conditions (after N occurrences or end date), and exceptions.
  • Workday Rules: Calculate business-day offsets using custom workweek (e.g., Mon–Fri, Mon–Sat), configurable public holidays and regional observance rules, and options to count partial days.
  • Time Zones & DST: Handle conversions across time zones and correctly apply daylight saving transitions when adding/subtracting intervals.
  • Duration Breakdown: Return differences as combined units (years, months, days, hours, minutes, seconds) or total units (total days, total hours).
  • Precision Modes: Support exact-calendar arithmetic (month lengths, leap years) and fixed-duration arithmetic (treat months as fixed 30 days if chosen).
  • Work Hours & Shift Support: Respect business hours or custom work shifts when calculating next available time or adding worktime durations.
  • Validation & Edge Cases: Clear behavior for end-of-month rules, ambiguous local times during DST fall-back, and leap-second considerations (if needed).

Use cases

  • Scheduling recurring meetings across teams in different time zones.
  • Calculating payroll hours using work shifts and holidays.
  • Project planning: add business days to set deadlines.
  • Countdown timers with mixed units (3 months, 2 days, 5 hours).

API / Input examples

  • Single operation: start=“2026-02-05T09:30:00-05:00”, add=“+1M2d4h” => result with proper DST handling.
  • Recurrence: start=“2026-03-31”, rule=“RRULE:FREQ=MONTHLY;BYMONTHDAY=31;COUNT=6” => generates dates handling months without day 31.
  • Workday add: start=“2026-12-23”, add_workdays=5, holidays=[“2026-12-25”,“2026-12-26”] => skips weekends and listed holidays.

Behavior notes

  • For monthly additions from day 31, option to use “last day of month” or “strict (skip invalid months)”.
  • Business-day additions skip configured holidays and non-working weekdays; partial-day additions can snap to next work hour if outside business hours.
  • When converting between time zones, present both UTC and local results and indicate any DST jump that affected the outcome.

Suggested outputs

  • Single ISO 8601 timestamp result.
  • Human-readable span: “2 months, 3 days, 4 hours”.
  • Recurrence list in ISO dates, paginated for long series.
  • Explanatory note when rules (like end-of-month) alter expected dates.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *