Creating a DateInterval Object Now that we understand what an interval is — it’s simply a duration of time — and that ISO 8601 defines our duration’s format, we can start playing around with the PHP DateInterval class. Let’s define a predictable duration, create a DateInterval object, and output the result to the screen. We’ll start with “1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds”. $
![An Introduction to the PHP DateInterval Class](https://cdn-ak-scissors.b.st-hatena.com/image/square/6d0d5802ca27d38f7f31687595f694b44a274c05/height=288;version=1;width=512/https%3A%2F%2Fwww.webfx.com%2Fwp-content%2Fuploads%2F2021%2F10%2Fwebsite-redesign-1.png)