| 1 |
//! moment.js |
| 2 |
//! version : 2.30.1 |
| 3 |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors |
| 4 |
//! license : MIT |
| 5 |
//! momentjs.com |
| 6 |
|
| 7 |
import { hooks as moment, setHookCallback } from './lib/utils/hooks'; |
| 8 |
|
| 9 |
moment.version = '2.30.1'; |
| 10 |
|
| 11 |
import { |
| 12 |
min, |
| 13 |
max, |
| 14 |
now, |
| 15 |
isMoment, |
| 16 |
momentPrototype as fn, |
| 17 |
createUTC as utc, |
| 18 |
createUnix as unix, |
| 19 |
createLocal as local, |
| 20 |
createInvalid as invalid, |
| 21 |
createInZone as parseZone, |
| 22 |
} from './lib/moment/moment'; |
| 23 |
|
| 24 |
import { getCalendarFormat } from './lib/moment/calendar'; |
| 25 |
|
| 26 |
import { |
| 27 |
defineLocale, |
| 28 |
updateLocale, |
| 29 |
getSetGlobalLocale as locale, |
| 30 |
getLocale as localeData, |
| 31 |
listLocales as locales, |
| 32 |
listMonths as months, |
| 33 |
listMonthsShort as monthsShort, |
| 34 |
listWeekdays as weekdays, |
| 35 |
listWeekdaysMin as weekdaysMin, |
| 36 |
listWeekdaysShort as weekdaysShort, |
| 37 |
} from './lib/locale/locale'; |
| 38 |
|
| 39 |
import { |
| 40 |
isDuration, |
| 41 |
createDuration as duration, |
| 42 |
getSetRelativeTimeRounding as relativeTimeRounding, |
| 43 |
getSetRelativeTimeThreshold as relativeTimeThreshold, |
| 44 |
} from './lib/duration/duration'; |
| 45 |
|
| 46 |
import { normalizeUnits } from './lib/units/units'; |
| 47 |
|
| 48 |
import isDate from './lib/utils/is-date'; |
| 49 |
|
| 50 |
setHookCallback(local); |
| 51 |
|
| 52 |
moment.fn = fn; |
| 53 |
moment.min = min; |
| 54 |
moment.max = max; |
| 55 |
moment.now = now; |
| 56 |
moment.utc = utc; |
| 57 |
moment.unix = unix; |
| 58 |
moment.months = months; |
| 59 |
moment.isDate = isDate; |
| 60 |
moment.locale = locale; |
| 61 |
moment.invalid = invalid; |
| 62 |
moment.duration = duration; |
| 63 |
moment.isMoment = isMoment; |
| 64 |
moment.weekdays = weekdays; |
| 65 |
moment.parseZone = parseZone; |
| 66 |
moment.localeData = localeData; |
| 67 |
moment.isDuration = isDuration; |
| 68 |
moment.monthsShort = monthsShort; |
| 69 |
moment.weekdaysMin = weekdaysMin; |
| 70 |
moment.defineLocale = defineLocale; |
| 71 |
moment.updateLocale = updateLocale; |
| 72 |
moment.locales = locales; |
| 73 |
moment.weekdaysShort = weekdaysShort; |
| 74 |
moment.normalizeUnits = normalizeUnits; |
| 75 |
moment.relativeTimeRounding = relativeTimeRounding; |
| 76 |
moment.relativeTimeThreshold = relativeTimeThreshold; |
| 77 |
moment.calendarFormat = getCalendarFormat; |
| 78 |
moment.prototype = fn; |
| 79 |
|
| 80 |
// currently HTML5 input type only supports 24-hour formats |
| 81 |
moment.HTML5_FMT = { |
| 82 |
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" /> |
| 83 |
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" /> |
| 84 |
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" /> |
| 85 |
DATE: 'YYYY-MM-DD', // <input type="date" /> |
| 86 |
TIME: 'HH:mm', // <input type="time" /> |
| 87 |
TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" /> |
| 88 |
TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" /> |
| 89 |
WEEK: 'GGGG-[W]WW', // <input type="week" /> |
| 90 |
MONTH: 'YYYY-MM', // <input type="month" /> |
| 91 |
}; |
| 92 |
|
| 93 |
export default moment; |