Skip to content

v1.2..1

Choose a tag to compare

@LeandroLCD LeandroLCD released this 09 Jun 01:45

Add DateTimeRange class and enhance DateTime functionality

This commit introduces a new DateTimeRange class to represent a range between two DateTime objects. It includes methods for calculating the span, checking if a date is contained within the range, and checking if two ranges overlap. A builder pattern is provided for convenient instantiation.

The DateTime class has been enhanced with:

  • daysInMonth property: Stores the number of days in the month of the DateTime instance.
  • firstDayOfMonth() method: Returns a new DateTime representing the first day of the current month.
  • lastDayOfMonth() method: Returns a new DateTime representing the last day of the current month.