Format Output Description
------ ---------- --------------------------------------------------------------
d 10 Day of the month, 2 digits with leading zeros
D Wed A textual representation of a day, three letters
j 10 Day of the month without leading zeros
l Wednesday A full textual representation of the day of the week
S th English ordinal day of month suffix, 2 chars (use with j)
w 3 Numeric representation of the day of the week
z 9 The julian date, or day of the year (0-365)
W 01 ISO-8601 2-digit week number of year, weeks starting on Monday (00-52)
F January A full textual representation of the month
m 01 Numeric representation of a month, with leading zeros
M Jan Month name abbreviation, three letters
n 1 Numeric representation of a month, without leading zeros
t 31 Number of days in the given month
L 0 Whether it's a leap year (1 if it is a leap year, else 0)
Y 2007 A full numeric representation of a year, 4 digits
y 07 A two digit representation of a year
a pm Lowercase Ante meridiem and Post meridiem
A PM Uppercase Ante meridiem and Post meridiem
g 3 12-hour format of an hour without leading zeros
G 15 24-hour format of an hour without leading zeros
h 03 12-hour format of an hour with leading zeros
H 15 24-hour format of an hour with leading zeros
i 05 Minutes with leading zeros
s 01 Seconds, with leading zeros
O -0600 Difference to Greenwich time (GMT) in hours
T CST Timezone setting of the machine running the code
Z -21600 Timezone offset in seconds (negative if west of UTC, positive if east)
如:当前时间精确到秒
var d = new Date().dateFormat('Y/m/d H:i:s')
javascript获取日期昨天的代码:
var yestoday = new Date();
yestoday.setTime(yestoday.setDate(yestoday.getDate() - 1));
javascript
获取日期上个月的今天的代码:
var month = new Date();
month.setTime(month.setMonth(month.getMonth() - 1));
分享到:
相关推荐
终于找到了 EXTJS Javascript HTML 代码格式化 工具。
EXTJS_DATEFORMAT 日期格式对应,网上找到的,挺好用的
extjs4 record mapping参数解释
extjs日期显示(如何转换日期格式),亲自试验过的,extjs6中可以使用的
extjs4.0结合My97DatePicker4.7版本使用 使用简单 方便 解决extjs中日期控件不能显示时间的问题 下载后将其放到extjs目录的examples下 直接运行date.html即可 extjs4.0版本 4.0以前的版本没有测试过 如果有4.0版本...
日期用Extjs自带的Ext.form.field.Date,时间用Ext.form.field.Number和Ext.form.Label进行组装。 样式显示为横向的日期、时间,非日期弹出框下方选择日期。 调用代码:Ext.create('erp.ux.form.field.DateTimer', {...
eclipse的Extjs的图形化开发插件,实用性比较强
extjs4扁平化设计,extjs4自定义主题,效果还不错,比较适合快捷学习和修改页面使用。
extjs时间日期选择组件.
主要格式js的文件让js代码更加的清晰,这样就会保持相同的风格
类似extjs中viewport的panel viewport只能渲染到body,而这个panel可以渲染到任何html元素,并且这个panel会自动变大!自动填充到最大化
extjs时间空间精确秒
EXTJS.GRIDPANEL中日期格式 设置
extjs2.0实现的日期时间选择控件,直接放在extjs的examples文件夹下运行。
Extjs4.1可使用的日期时间选择控件,其中有一些不合理之处请各位多提宝贵意见。
ExtJS日期时间控件。详细信息参照我的博文: http://blog.csdn.net/lvye1221/article/details/10225941 这是我在 apache 目录下部署了测试示例。将附件中的测试用例,按照以下方式部署好,即可成功访问: apache ...
日期用Extjs自带的Ext.form.field.Date,时间用Ext.form.field.Number和Ext.form.Label进行组装。 样式为横向的日期、时间,非日期弹出框下方选择时间。 注意事项:1、只有日期、年、月、日全部选择后,才能从name中...
http://www.uspcat.com/forum.php?mod=viewthread&tid=5293 帖子上的日期时间控件有显示的问题,现在修改一下发出来, 该控件基于4.1版本
分享给爱好EXTJS的同胞们! EXTJS4.0文件夹下面包括 1.只有年月选择--dateYM.html (这个在EXTJS4.0和4.1下显示都是可以的) 2.扩展日期选择时分秒--dateTimeField4.0.html (这个只在EXTJS4.0下显示可以) ...
ExtJs 推出了ExtJs 可视化开发工具,这里是所需的三个文件:AdobeAIRInstaller.zip,Ext_Disigner_Preview.rar,xds_preview.air。请按说明文档一次安装