calendar-daysCalendar value object

πŸ“… CalendarDate Value Object

CalendarDate is an immutable date-only value object.

It represents a calendar date without time and timezone.

Perfect for:

  • Birthdays

  • Subscription periods

  • Business deadlines

  • Billing cycles

  • Domain rules where time is irrelevant


Features

  • Immutable YYYY-MM-DD representation

  • Creation from string or native Date

  • Validation of invalid dates

  • Safe add/subtract days

  • Comparison helpers

  • Conversion to native Date (00:00:00 time)


Usage


πŸ— Example: Using CalendarDate with IClock

Last updated

Was this helpful?