date-time
date-time copied to clipboard
Date and time library for PHP
I suggest `Interval` should have the following methods, like in `LocalDateRange`: - `contains(Instant): bool` - `intersectsWith(Interval): bool` - `getIntersectionWith(Interval): Interval` - `of(Instant, Instant): self` - for consistency with other classes...
This is my take on the formatting API (#3). It adds the `format()` method to `Local(Date|DateTime|Time)` and `ZonedDateTime`. The method accepts an implementation of the `DateTimeFormatter` interface. The API is...
This aim to use the organization's coding standards. Needs https://github.com/brick/coding-standards/pull/2 to be merged to see green CI results. I've tested it under my own forks as you can see here:...
Hello, `Interval` is a range of two instants and `LocalDateRange` is not Zoned nor include time. However for cases where you need to schedule an event in the future (e.g....
It will be useful to have `LocalDateTimeRange` to encapsulate start and end datetime. Quite similar to the `LocalDateRange`. Otherwise we need to do something like this if we want to...
Following code works well (no output): ```php ZonedDateTime::of( LocalDateTime::of(2022,1,1), TimeZoneRegion::parse('Europe/Prague') ); ``` while this one throws `Brick\DateTime\DateTimeException: The time zone offset of 3464 seconds is not a multiple of 60`:...
Hey there, i got this: ```php $whenUtc = ZonedDateTime::parse('2021-07-18T07:00:00Z'); $whenUtc->getTimezone()->isEqualTo(TimeZone::utc()); // -> false ``` the timezone is then Z same with etc/UTC which represents the same TimeZone. Do you want...