node_modules/moment/src/lib/moment/prototype.js (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
import { Moment } from './constructor'; var proto = Moment.prototype; import { add, subtract } from './add-subtract'; import { calendar, getCalendarFormat } from './calendar'; import { clone } from './clone'; import { isBefore, isBetween, isSame, isAfter, isSameOrAfter, isSameOrBefore } from './compare'; import { diff } from './diff'; import { format, toString, toISOString, inspect } from './format'; import { from, fromNow } from './from'; import { to, toNow } from './to'; import { stringGet, stringSet } from './get-set'; import { locale, localeData, lang } from './locale'; import { prototypeMin, prototypeMax } from './min-max'; import { startOf, endOf } from './start-end-of'; import { valueOf, toDate, toArray, toObject, toJSON, unix } from './to-type'; import { isValid, parsingFlags, invalidAt } from './valid'; import { creationData } from './creation-data'; proto.add = add; proto.calendar = calendar; proto.clone = clone; proto.diff = diff; proto.endOf = endOf; proto.format = format; proto.from = from; proto.fromNow = fromNow; proto.to = to; proto.toNow = toNow; proto.get = stringGet; proto.invalidAt = invalidAt; proto.isAfter = isAfter; proto.isBefore = isBefore; proto.isBetween = isBetween; proto.isSame = isSame; proto.isSameOrAfter = isSameOrAfter; proto.isSameOrBefore = isSameOrBefore; proto.isValid = isValid; proto.lang = lang; proto.locale = locale; proto.localeData = localeData; proto.max = prototypeMax; proto.min = prototypeMin; proto.parsingFlags = parsingFlags; proto.set = stringSet; proto.startOf = startOf; proto.subtract = subtract; proto.toArray = toArray; proto.toObject = toObject; proto.toDate = toDate; proto.toISOString = toISOString; proto.inspect = inspect; proto.toJSON = toJSON; proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; // Year import { getSetYear, getIsLeapYear } from '../units/year'; proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; // Week Year import { getSetWeekYear, getSetISOWeekYear, getWeeksInYear, getISOWeeksInYear } from '../units/week-year'; proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; // Quarter import { getSetQuarter } from '../units/quarter'; proto.quarter = proto.quarters = getSetQuarter; // Month import { getSetMonth, getDaysInMonth } from '../units/month'; proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; // Week import { getSetWeek, getSetISOWeek } from '../units/week'; proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.isoWeeksInYear = getISOWeeksInYear; // Day import { getSetDayOfMonth } from '../units/day-of-month'; import { getSetDayOfWeek, getSetISODayOfWeek, getSetLocaleDayOfWeek } from '../units/day-of-week'; import { getSetDayOfYear } from '../units/day-of-year'; proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; // Hour import { getSetHour } from '../units/hour'; proto.hour = proto.hours = getSetHour; // Minute import { getSetMinute } from '../units/minute'; proto.minute = proto.minutes = getSetMinute; // Second import { getSetSecond } from '../units/second'; proto.second = proto.seconds = getSetSecond; // Millisecond import { getSetMillisecond } from '../units/millisecond'; proto.millisecond = proto.milliseconds = getSetMillisecond; // Offset import { getSetOffset, setOffsetToUTC, setOffsetToLocal, setOffsetToParsedOffset, hasAlignedHourOffset, isDaylightSavingTime, isDaylightSavingTimeShifted, getSetZone, isLocal, isUtcOffset, isUtc } from '../units/offset'; proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; proto.parseZone = setOffsetToParsedOffset; proto.hasAlignedHourOffset = hasAlignedHourOffset; proto.isDST = isDaylightSavingTime; proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; // Timezone import { getZoneAbbr, getZoneName } from '../units/timezone'; proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; // Deprecations import { deprecate } from '../utils/deprecate'; proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); export default proto; |