英文字典

别名键 简写键
year years y
quarter quarters Q
month months M
week weeks w
day days d
hour hours h
minute minutes m
second seconds s
millisecond milliseconds ms

转为毫秒值

moment(1318874398806).valueOf(); 
// 1318874398806
+moment(1318874398806); 
// 1318874398806

转为 Date 实例对象

moment().toDate();

转为 Array

moment().toArray(); 
// [2013, 1, 4, 14, 40, 16, 154];

转为 Object

moment().toObject();
// {
//     years: 2015
//     months: 6
//     date: 26,
//     hours: 1,
//     minutes: 53,
//     seconds: 14,
//     milliseconds: 600s
// }

转为 String

// 以与 JS Date 的 .toString() 类似的格式返回英文字符串。
moment().toString() 
// "Sat Apr 30 2016 16:59:46 GMT-0500"