命名空间 date
Defined in: jx.date.js.
Constructor Attributes | Constructor Name and Description |
---|---|
dom 名字空间
|
Method Attributes | Method Name and Description |
---|---|
<static> |
date.format(format)
让日期和时间按照指定的格式显示的方法
|
方法详解
<static>
{String}
date.format(format)
- 功能:
- 让日期和时间按照指定的格式显示的方法
Jx().$package(function(J){ var d = new Date(); // 以 YYYY-MM-dd hh:mm:ss 格式输出 d 的时间字符串 J.date.format(d, "YYYY-MM-DD hh:mm:ss"); };
- 参数:
-
- {String} format
- 格式字符串
- 返回:
- {String} 返回生成的日期时间字符串