Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Date Time Precision Laravel Package

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.

View on GitHub
Deep Wiki
Context7
0.9.0
  • Breaking change: Dropped support for Symfony 6.3.
  • Added support for Symfony 7.
  • Fixed naming in functions of Moment class. Parameter was called $dateTime, but should have been $moment.
0.8.1
  • Added missing return type in DateTimePrecisionExtension.
0.8.0
  • Breaking change: Dropped support for PHP 8.1.
  • Breaking change: Dropped support for Symfony below 6.3.
  • Breaking change: Instances of DateTime are now always created in the UTC timezone (independent on the configured default timezone in PHP).
  • Breaking change: Renamed package to digital-craftsman/date-time-precision.
  • Breaking change: Renamed DateTime to Moment including normalizer and Doctrine type.
  • Breaking change: Updated Doctrine moment type to support milliseconds.
  • Added support for PHP 8.3.
  • Added support for the new normalizer caching mechanism of Symfony 6.3.
  • Switched classes to be readonly (instead of just the properties).
  • Automatically register the Doctrine types.
  • Removed custom code in Date and Month and used PHP SPL to handle date comparisons.
  • Added DateTime->isNotAfter
  • Added DateTime->isNotAfterOrEqualTo.
  • Added DateTime->isNotBeforeOrEqualTo.
  • Added DateTime->isNotBefore.
  • Added DateTime->isDateNotAfterInTimeZone.
  • Added DateTime->isDateNotAfterOrEqualToInTimeZone.
  • Added DateTime->isDateNotBeforeInTimeZone.
  • Added DateTime->isDateNotBeforeOrEqualToInTimeZone.
  • Added Date->isNotAfter.
  • Added Date->isNotBefore.
  • Added Date->isNotBeforeOrEqualTo.
  • Added Date->isNotAfterOrEqualTo.
  • Added Month->isNotBefore.
  • Added Month->isNotBeforeOrEqualTo.
  • Added Month->isNotAfter.
  • Added Month->isNotAfterOrEqualTo.
  • Added Year->isNotBefore.
  • Added Year->isNotAfterOrEqualTo.
  • Added Year->isNotAfter.
  • Added Year->isNotBeforeOrEqualTo.
0.7.0
  • Added Date->datesUntil(Date $date, PeriodLimit $periodLimit = PeriodLimit::INCLUDING_START_AND_END): array.
  • Added Year->yearsUntil(Year $year, PeriodLimit $periodLimit = PeriodLimit::INCLUDING_START_AND_END): array.
  • Added Year->modify(string $modifier): Year.
0.6.1
  • Added missing DateTimeType->requiresSQLCommentHint(): bool.
  • Added missing DateType->requiresSQLCommentHint(): bool.
  • Added missing TimeType->requiresSQLCommentHint(): bool.
0.6.0
  • Added Year->compareTo(self $year): int.
  • Added Month->compareTo(self $month): int.
  • Added Date->compareTo(self $date): int.
  • Updated Time->compareTo(self $time): int to use less custom code.
0.5.0
  • Added DateTime->isDateNotEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
  • Added Date->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.
  • Added Date->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.
  • Added Month->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.
  • Added Month->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.
  • Added Year->toDateTimeInTimeZone(\DateTimeZone $timeZone): self.
  • Added Year->modifyInTimeZone(string $modify, \DateTimeZone $timeZone): self.
  • Added YearNormalizer to automatic registered normalizers.
0.4.0
  • Added DateTime->isDateAfterInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
  • Added DateTime->isDateAfterOrEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
  • Added DateTime->isDateEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
  • Added DateTime->isDateBeforeInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
  • Added DateTime->isDateBeforeOrEqualToInTimeZone(DateTime $dateTime, \DateTimeZone $timeZone): bool.
0.3.0
  • Renamed Month->$monthOfYear to Month->$month.
  • Renamed Date->$dayOfMonth to Date->$day.
  • Added DateTime->isAtMidnight(): bool.
  • Added DateTime->isNotAtMidnight(): bool.
  • Added DateTime->isAtMidnightInTimeZone(\DateTimeZone $timeZone): bool.
  • Added DateTime->isNotAtMidnightInTimeZone(\DateTimeZone $timeZone): bool.
  • Added DateTime->setTimeInTimeZone(Time $time, \DateTimeZone $timeZone): self.
0.2.0
  • Added DateTime->formatInTimeZone(string $format, \DateTimeZone $timeZone).
0.14.0
  • Added class for Day.
  • Added class for Days.
  • Breaking change: Updated $day value of Month to be a Day instead of an int.
0.13.1
  • Fixed version constraint of digital-craftsman/self-aware-normalizers.
0.13.0
  • Updated registration to auto registration for doctrine types.
  • Deprecated previous doctrine types.
0.12.0
  • Added support for PHP 8.5.
  • Dropped support for PHP 8.3.
  • Added support for Symfony ^8.0.
  • Dropped support for Symfony 7.3 and below. Only the 7.4 LTS version is still supported.
0.11.1
  • Updated digital-craftsman/self-aware-normalizers to use the first stable version.
0.11.0
  • Breaking change: Removed deprecated isDate* methods from Moment.
  • Breaking change: Dropped custom normalizers in favor of digital-craftsman/self-aware-normalizers.
  • Breaking change Dropped support for PHP 8.2.
  • Added Clock implementation with SystemClock and FrozenClock.
  • Added guard methods for comparison methods to Moment, Date and Time like mustBeEqualTo with option to throw custom exception.
  • Changed normalization of Moment to include microseconds.
  • Added support for PHP 8.4.
0.10.0
  • Added is*InTimeZone(Time | Date | Month | Year $equalTo, \DateTimeZone $timeZone): bool methods to Moment.
  • Added missing comparison methods to Time (like isNotAfter(self $time): bool).
  • Deprecated isDate*InTimeZone methods from Moment (will be removed in next minor version).
0.1.0
  • Initial release
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor