- 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
广告