Get2.2.1+
moment().get('year');
moment().get('month'); // 0 to 11
moment().get('date');
moment().get('hour');
moment().get('minute');
moment().get('second');
moment().get('millisecond');
String getter. In general
moment().get(unit) === moment()[unit]()
Units are case insensitive, and support plural and short forms: year (years,y), month (months, M), date (dates, D), hour (hours, h), minute (minutes, m),second (seconds, s), millisecond (milliseconds, ms).
当前内容版权归 momentjs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 momentjs.com .