注意兩點即可:
1.蘋果只認識 yyyy/mmmm/dddd/ 這類格式的日期
2.如果輸出后還要進行處理日期對比,蘋果默認會帶中文字,如:年月日,需要轉成上面1當中的日期格式在轉時間戳進行比較
GetDateDiff(checked_in) { //將xxxx-xx-xx的時間格式,轉換為 xxxx/xx/xx的格式 checked_in = checked_in.replace(/\-/g, "/"); return checked_in }
注意兩點即可:
1.蘋果只認識 yyyy/mmmm/dddd/ 這類格式的日期
2.如果輸出后還要進行處理日期對比,蘋果默認會帶中文字,如:年月日,需要轉成上面1當中的日期格式在轉時間戳進行比較
GetDateDiff(checked_in) { //將xxxx-xx-xx的時間格式,轉換為 xxxx/xx/xx的格式 checked_in = checked_in.replace(/\-/g, "/"); return checked_in }
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。