时间格式 PT00H00M00S 的名称是什么,使用什么语言? [英] What is the name of the time format PT00H00M00S and what languages use it?

查看:74
本文介绍了时间格式 PT00H00M00S 的名称是什么,使用什么语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 PHP 脚本处理 excel 文档,但无法确定 PT00H00M00S 是什么数据类型/格式,随后我找不到不使用正则表达式的方法.我想将其转换为更标准的时间格式 (00:00:00),但我无法在 google 上对此进行研究,因为我不知道PT...S"实际上被称为日期类型/格式.

I'm working with excel documents using PHP scripts and cannot determine what data type/format PT00H00M00S is, and subsequently I can't find a way to work with it without using regex. I'd like to convert this into a more standard time format (00:00:00) and I can't research this on google because I don't know what "PT...S" is actually called as a date type/format.

请帮帮我.

推荐答案

这是一个 ISO 8601 持续时间.

请参阅此简要概述:http://en.wikipedia.org/wiki/ISO_8601#Durations

许多语言都有可用的工具,包括 DateInterval.

Many languages have tools available to work with them, including PHP in the form of DateInterval.

这篇关于时间格式 PT00H00M00S 的名称是什么,使用什么语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆