3s2ng Posted June 22, 2007 Share Posted June 22, 2007 Hello Freaks, I hope you can help me. I'm trying to parse an ISO 8601 to a simple output like 2days 12hours 5mins 12secs. But the problem is I dont know where to start. Here is the explanation. Duration values are in the ISO 8601 duration format, where P represents "Period", nY represents the number of years, nM the number of months, nD the number of days, T is the date/time separator, nH the number of hours, nM the number of minutes, and nS the number of seconds. So P2DT23H32M51S means "A period of 2 days, 23 hours, 32 minutes, and 51 seconds". PnYnMnDTnH nMnS (e.g., P2DT23H32M51S) I hope anyone can help me with this. Thanks, MARK Quote Link to comment https://forums.phpfreaks.com/topic/56671-iso-8601-duration-time-format/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.