// 日付、分、秒 getFullTime(){ DATE LET = 新しい新しい日付()、// タイムスタンプ10×1000を必要とするが、その後、1000年によるなしのタイムスタンプ13は、 Yは(Date.getFullYearを=)+ '' 、 M =(date.getMonth()+ 1 <10 +(date.getMonth()+ 1) '0':date.getMonth()+ 1 )、 D =(date.getDate()<10 '0' +?(date.getDate()):date.getDate())、 H =(date.getHours()<10 '0' +?(date.getHours()):date.getHours())、 M =(date.getMinutes()<10 '0' +?(date.getMinutes()):date.getMinutes())、 S =(date.getSeconds()<10 '0' +?(date.getSeconds()):date.getSeconds()); 戻り Y + M + D +のH + M + Sを }、 // 現在のタイムスタンプを取得 GetLocalTimeを(){ 返す 新新)()getTime(日; }、 // タイムスタンプ time2TimeStap(タイマ){ 返す 新しい新しい日付(タイマ).getTimeを(); }、
ここでは、注意する必要があります。
Date.getFullYear()は、デジタルタイプを取得し、それが文字列に転送」+続いて必要です