-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add microseconds support to timestamp format
Prior to this patch, this would require a custom constructor in the form of: ```php static fn(float | int $timestamp): DateTimeImmutable => new DateTimeImmutable(sprintf("@%d", $timestamp)), ``` This bypasses the datetime format support of Valinor entirely. This is required because the library does not support floats as valid DateTimeInterface input values. This PR adds support for floats and registers timestamp.microseconds (U.u) as a valid default format.
- Loading branch information
Rick Kerkhof
committed
May 1, 2024
1 parent
40e6fa3
commit 8a0a7be
Showing
5 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters