Skip to content

Conversation

acoulton
Copy link
Member

No description provided.

DateIntervalUtils::toHuman() can render a string representation of (some)
DateInterval objects. Not all, because only some formats can be sensibly
converted back to a human-readable string.

DateIntervalFactory provides shorthand methods for creating from an
integer number of seconds / hours / days / monthsetc to reduce the
need for code like

`new DateInterval('PT'.$this->some_var.'M')`

and also to reduce the risk of confusing minutes and months.
@acoulton acoulton requested a review from craig410 October 17, 2023 12:02
@acoulton acoulton enabled auto-merge October 17, 2023 16:38
@acoulton acoulton merged commit 7fdedf1 into 1.x Oct 17, 2023
@acoulton acoulton deleted the 1.x-feat-date-utils branch October 17, 2023 16:38
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