Ancestors

Toot

Written by Chris Abbey on 2024-09-05 at 17:47

hmm... anyone got a decent way to divide a DateInterval in #PHP? Like say my function is passed one in and I want to create an interval that is half as long... perhaps because I want to schedule an event that happens at the half way mark of that interval. Current theory is to use DateTime::add() to append it to a "now" to make "then", then getTimestamp() on both and divide that... but this feels quite inpercise given how rich the Dateinterval objects are capable of being defined.

=> More informations about this toot | More toots from cabbey@phpc.social

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113086197540698838
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
279.519593 milliseconds
Gemini-to-HTML Time
0.388014 milliseconds

This content has been proxied by September (3851b).