Skip to content

Add ZonedDateTime::getDurationTo method#71

Merged
BenMorel merged 5 commits intobrick:masterfrom
solodkiy:ZonedDateTime_getDurationTo
Jul 23, 2023
Merged

Add ZonedDateTime::getDurationTo method#71
BenMorel merged 5 commits intobrick:masterfrom
solodkiy:ZonedDateTime_getDurationTo

Conversation

@solodkiy
Copy link
Copy Markdown
Contributor

@solodkiy solodkiy commented Jul 2, 2023

Just more convenient way to get Duration between two ZonedDateTime

$duration = Duration::between($first->getInstant(), $second->getInstant());
->
$duration = $first->getDurationTo($second);

@BenMorel
Copy link
Copy Markdown
Member

A few nitpicks, otherwise LGTM @solodkiy!

@solodkiy
Copy link
Copy Markdown
Contributor Author

@BenMorel
Resolved

@BenMorel BenMorel force-pushed the ZonedDateTime_getDurationTo branch from f71616d to ca2a493 Compare July 23, 2023 18:12
@BenMorel BenMorel force-pushed the ZonedDateTime_getDurationTo branch from ca2a493 to 6d9d427 Compare July 23, 2023 18:15
@BenMorel BenMorel merged commit 58aabaf into brick:master Jul 23, 2023
@BenMorel
Copy link
Copy Markdown
Member

BenMorel commented Aug 1, 2023

Released in 0.5.1!

@solodkiy solodkiy deleted the ZonedDateTime_getDurationTo branch August 14, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants