- MomentJS 教程
- MomentJS - 主頁
- MomentJS - 概覽
- MomentJS - 環境設定
- MomentJS - 簡介
- MomentJS - 解析日期和時間
- MomentJS - 日期驗證
- MomentJS - Getter/Setter
- 操作日期和時間
- 格式化日期和時間
- MomentJS - 日期查詢
- MomentJS - 國際化
- MomentJS - 定製
- MomentJS - 持續時間
- MomentJS - 實用工具
- MomentJS - 外掛
- MomentJS - 示例
- MomentJS 有用資源
- MomentJS - 快速指南
- MomentJS - 有用資源
- MomentJS - 討論
MomentJS - parseZone
該方法解析了提供的字串,並將結果時刻儲存在固定時區中。
語法
moment.parseZone() moment.parseZone(String)
示例
var a = moment().parseZone();
輸出
moment.parseZone 類似於將 moment.utcOffset 與一個字串一起使用。
示例
var a = moment("2013-01-01T00:00:00-13:00").utcOffset("2013-01-01T00:00:00-13:00");
var b = moment.parseZone("2013-01-01T00:00:00-13:00");
輸出
momentjs_parsing_date_and_time.htm
廣告