Permalink
b8f0565 Jun 6, 2014
24 lines (19 sloc) 535 Bytes
title version signature
Get
2.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).