ext DateField控制項格式

來源:互聯網
上載者:User

配置  format: 'Y-m-d',

格式 說明 例子
d 月裡面的日期,2位,不足前面補0 01-31
D 星期裡面的每天的縮寫 Mon - Sun
j 月裡面的日期,前面不補0 1-31
l 星期的完整寫法 Sunday to Saturday
N ISO-8601的星期標記法 1=星期一,7是星期日
S 英語習慣的月內每天的2位的首碼 st, nd, rd or th.
w 星期的數字表示 0=星期日,6等星期六
Z 在年內的第幾天,從0開始 0-364,閏年是365
W ISO-8601格式的,年內的星期數,從星期一開始 01-53
F 月份的完整文字表示 January to December
m 月份的2位元字表示,不足前面補零 01-12
M 月份的縮寫文字表示 Jan to Dec
n 月份的數字表示,不補零 1-12
t 月份的最大天數 28-31
L 是否為閏年 1是閏年,0則不是
o ISO-8601的年份表示,和Y相同,但是如果星期(W)輸入前一年或者後一年,則替換為那個年 1998,2004
Y 4位的年份表示 2008
y 2位的年份表示 98,08
a 小寫上下午表示 am pm
A 大寫的上下午 AM PM
g 12小時制,不補零 1-12
G 24小時制,不補零 0-23
h 12小時制,2位,不足補零 01-12
H 24小時制,2位,不足補零 00-23
i 分鐘,2位,不足補零 00-59
s 秒,2位,不足補零 00-59
u 毫秒,前面補零 001 999
O Difference to Greenwich time (GMT) in hours and minutes +1030
P Difference to Greenwich time (GMT) with colon between hours and minutes -08:00
T Timezone abbreviation of the machine running the code EST, MDT, PD
Z Timezone offset in seconds (negative if west of UTC, positive if east) -43200 to 50400
c ISO 8601 date (note: milliseconds, if present, must be specified with at least 1 digit. There is no limit to how many digits the millisecond value may contain. see http://www.w3.org/TR/NOTE-datetime for more info) 2007-04-17T15:19:21+08:002008-03-16T16:18:22Z
U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 -2138434463

例如:Y-m-d  2010-01-01

Y-n-j       2010-1-1

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.