I have time strings like PT19H15M, PT10H, PT5M, etc.
PT19H15M is 19:15; PT10H is 10:00; PT5M is 00:05
I want to convert each line to normal time.
is there a built-in method
Formatted as the duration of ISO 8601 , which is supported DateInterval, which has a convenient method format.
DateInterval
format
So for example:
echo (new DateInterval("PT19H15M"))->format("%H:%I");
will output:
19:15
, "PT" Pacific Time. P , T - , .., , . P2YT19H 2 19 .
Source: https://habr.com/ru/post/1682284/More articles:Can you open a port request to add code from the repo? - gitPython multiprocessor class manager thread object / security process - pythonMake sure two Python classes have properties of the same name - pythonSpring Boot may find resource file, but Java class does not work with NullPointerException - javaFind out if anyone has a role - javascriptOpenGL 4.5 - mock buffer shader storage layout - c ++How to use paginator from angular material? - angularПакет для прокрутки всех файлов с предопределенным списком или набором расширений и игнорирование всех других типов файлов - windowsWhy is my smallIcon for notifications always grayed out? - androidHow to remove quotation marks and get list in python? - pythonAll Articles