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