new Date("month dd,yyyy hh:mm:ss"); new Date("month dd,yyyy"); new Date(yyyy,mth,dd,hh,mm,ss); new Date(yyyy,mth,dd); new Date(ms);
month:用英文 表示月份名稱,從January到December
mth:用整數表示月份,從(1月)0到11(12月)
dd:表示一個 月中的第幾天,從1到31
yyyy:四位數表示的年份
hh:小時數,從0(午夜)到23(晚11點)
mm: 分鍾數,從0到59的整數
ss:秒數,從0到59的整數
ms:毫秒數,為大於等於0的整數
new Date("January 12,2006 22:19:35");
new Date("January 12,2006");
new Date(2006,0,12,22,19,35);
new Date(2006,0,12);
new Date(1137075575000);
如果這篇文章對您有幫助,您可以打賞我
技術交流QQ群:15129679