名称空间(Namespace): date

x. date

日期和时间

Requires

  • module:x

newTime
newTimeSpan

方法(Methods)

<static> add()

比较两个时间差异

<static> create(timeValue)

创建时间对象
参数(Parameters):
名称 类型 描述
timeValue object 符合时间规则的日期, 数组, 字符串

<static> diff()

比较两个时间差异

<static> format(timeValue, formatValue)

时间格式化
参数(Parameters):
名称 类型 描述
timeValue object 符合时间规则的日期, 数组, 字符串
formatValue string 时间格式
示例(Example)
x.date.format('2000-01-01 00:00:00', 'yyyy/MM/dd hh:mm:ss');

<static> formatInterval()

格式化时间间隔参数