digital-craftsman/date-time-precision
Thin PHP value objects for precise date/time concepts: Moment (UTC-backed) plus Time, Date, Month, Year, Day, Weekday and collections. Avoid misleading DateTime comparisons, handle timezone-safe modifications (DST), with Symfony normalizers and Doctrine types.
Day.Days.$day value of Month to be a Day instead of an int.digital-craftsman/self-aware-normalizers to use the first stable version.isDate* methods from Moment.digital-craftsman/self-aware-normalizers.Clock implementation with SystemClock and FrozenClock.Moment, Date and Time like mustBeEqualTo with option to throw custom exception.Moment to include microseconds.is*InTimeZone(Time | Date | Month | Year $equalTo, \DateTimeZone $timeZone): bool methods to Moment.isDate*InTimeZone methods from Moment.Moment class. Parameter was called $dateTime, but should have been $moment.DateTimePrecisionExtension.DateTime are now always created in the UTC timezone (independent on the configured default timezone in PHP).digital-craftsman/date-time-precision.DateTime to Moment including normalizer and Doctrine type.readonly (instead of just the properties).Date and Month and used PHP SPL to handle date comparisons.DateTime->isNotAfterDateTime->isNotAfterOrEqualTo.DateTime->isNotBeforeOrEqualTo.DateTime->isNotBefore.DateTime->isDateNotAfterInTimeZone.DateTime->isDateNotAfterOrEqualToInTimeZone.DateTime->isDateNotBeforeInTimeZone.DateTime->isDateNotBeforeOrEqualToInTimeZone.Date->isNotAfter.Date->isNotBefore.Date->isNotBeforeOrEqualTo.Date->isNotAfterOrEqualTo.Month->isNotBefore.Month->isNotBeforeOrEqualTo.Month->isNotAfter.Month->isNotAfterOrEqualTo.Year->isNotBefore.Year->isNotAfterOrEqualTo.Year->isNotAfter.Year->isNotBeforeOrEqualTo.Date->datesUntil(Date $date, PeriodLimit $periodLimit = PeriodLimit::INCLUDING_START_AND_END): array.Year->yearsUntil(Year $year, PeriodLimit $periodLimit = PeriodLimit::INCLUDING_START_AND_END): array.Year->modify(string $modifier): Year.DateTimeType->requiresSQLCommentHint(): bool.DateType->requiresSQLCommentHint(): bool.TimeType->requiresSQLCommentHint(): bool.Year->compareTo(self $year): int.Month->compareTo(self $month): int.Date->compareTo(self $date): int.Time->compareTo(self $time): int to use less custom code.DateTime->isDateNotEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.Date->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.Date->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.Month->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.Month->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.Year->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.Year->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.YearNormalizer to automatic registered normalizers.isDateAfterInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool in DateTime.isDateAfterOrEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool in DateTime.isDateEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool in DateTime.isDateBeforeInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool in DateTime.isDateBeforeOrEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool in DateTime.$monthOfYear to $month in Month.$dayOfMonth to $day in Date.isAtMidnight(): bool in DateTime.isNotAtMidnight(): bool in DateTime.isAtMidnightInTimeZone(\DateTimeZone $timeZone): bool in DateTime.isNotAtMidnightInTimeZone(\DateTimeZone $timeZone): bool in DateTime.setTimeInTimeZone(Time $time, \DateTimeZone $timeZone): self in DateTime.Initial release compatible with PHP 8.1 and PHP 8.2 (RC version), including 100% code coverage and 100% MSI coverage.
How can I help you explore Laravel packages today?