1 | declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, strict?: boolean): moment.Moment;
|
2 | declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
|
3 |
|
4 | declare namespace moment {
|
5 | type RelativeTimeKey = 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy';
|
6 | type CalendarKey = 'sameDay' | 'nextDay' | 'lastDay' | 'nextWeek' | 'lastWeek' | 'sameElse' | string;
|
7 | type LongDateFormatKey = 'LTS' | 'LT' | 'L' | 'LL' | 'LLL' | 'LLLL' | 'lts' | 'lt' | 'l' | 'll' | 'lll' | 'llll';
|
8 |
|
9 | interface Locale {
|
10 | calendar(key?: CalendarKey, m?: Moment, now?: Moment): string;
|
11 |
|
12 | longDateFormat(key: LongDateFormatKey): string;
|
13 | invalidDate(): string;
|
14 | ordinal(n: number): string;
|
15 |
|
16 | preparse(inp: string): string;
|
17 | postformat(inp: string): string;
|
18 | relativeTime(n: number, withoutSuffix: boolean,
|
19 | key: RelativeTimeKey, isFuture: boolean): string;
|
20 | pastFuture(diff: number, absRelTime: string): string;
|
21 | set(config: Object): void;
|
22 |
|
23 | months(): string[];
|
24 | months(m: Moment, format?: string): string;
|
25 | monthsShort(): string[];
|
26 | monthsShort(m: Moment, format?: string): string;
|
27 | monthsParse(monthName: string, format: string, strict: boolean): number;
|
28 | monthsRegex(strict: boolean): RegExp;
|
29 | monthsShortRegex(strict: boolean): RegExp;
|
30 |
|
31 | week(m: Moment): number;
|
32 | firstDayOfYear(): number;
|
33 | firstDayOfWeek(): number;
|
34 |
|
35 | weekdays(): string[];
|
36 | weekdays(m: Moment, format?: string): string;
|
37 | weekdaysMin(): string[];
|
38 | weekdaysMin(m: Moment): string;
|
39 | weekdaysShort(): string[];
|
40 | weekdaysShort(m: Moment): string;
|
41 | weekdaysParse(weekdayName: string, format: string, strict: boolean): number;
|
42 | weekdaysRegex(strict: boolean): RegExp;
|
43 | weekdaysShortRegex(strict: boolean): RegExp;
|
44 | weekdaysMinRegex(strict: boolean): RegExp;
|
45 |
|
46 | isPM(input: string): boolean;
|
47 | meridiem(hour: number, minute: number, isLower: boolean): string;
|
48 | }
|
49 |
|
50 | interface StandaloneFormatSpec {
|
51 | format: string[];
|
52 | standalone: string[];
|
53 | isFormat?: RegExp;
|
54 | }
|
55 |
|
56 | interface WeekSpec {
|
57 | dow: number;
|
58 | doy: number;
|
59 | }
|
60 |
|
61 | type CalendarSpecVal = string | ((m?: MomentInput, now?: Moment) => string);
|
62 | interface CalendarSpec {
|
63 | sameDay?: CalendarSpecVal;
|
64 | nextDay?: CalendarSpecVal;
|
65 | lastDay?: CalendarSpecVal;
|
66 | nextWeek?: CalendarSpecVal;
|
67 | lastWeek?: CalendarSpecVal;
|
68 | sameElse?: CalendarSpecVal;
|
69 |
|
70 | // any additional properties might be used with moment.calendarFormat
|
71 | [x: string]: CalendarSpecVal | void; // undefined
|
72 | }
|
73 |
|
74 | type RelativeTimeSpecVal = (
|
75 | string |
|
76 | ((n: number, withoutSuffix: boolean,
|
77 | key: RelativeTimeKey, isFuture: boolean) => string)
|
78 | );
|
79 | type RelativeTimeFuturePastVal = string | ((relTime: string) => string);
|
80 |
|
81 | interface RelativeTimeSpec {
|
82 | future?: RelativeTimeFuturePastVal;
|
83 | past?: RelativeTimeFuturePastVal;
|
84 | s?: RelativeTimeSpecVal;
|
85 | ss?: RelativeTimeSpecVal;
|
86 | m?: RelativeTimeSpecVal;
|
87 | mm?: RelativeTimeSpecVal;
|
88 | h?: RelativeTimeSpecVal;
|
89 | hh?: RelativeTimeSpecVal;
|
90 | d?: RelativeTimeSpecVal;
|
91 | dd?: RelativeTimeSpecVal;
|
92 | M?: RelativeTimeSpecVal;
|
93 | MM?: RelativeTimeSpecVal;
|
94 | y?: RelativeTimeSpecVal;
|
95 | yy?: RelativeTimeSpecVal;
|
96 | }
|
97 |
|
98 | interface LongDateFormatSpec {
|
99 | LTS: string;
|
100 | LT: string;
|
101 | L: string;
|
102 | LL: string;
|
103 | LLL: string;
|
104 | LLLL: string;
|
105 |
|
106 | // lets forget for a sec that any upper/lower permutation will also work
|
107 | lts?: string;
|
108 | lt?: string;
|
109 | l?: string;
|
110 | ll?: string;
|
111 | lll?: string;
|
112 | llll?: string;
|
113 | }
|
114 |
|
115 | type MonthWeekdayFn = (momentToFormat: Moment, format?: string) => string;
|
116 | type WeekdaySimpleFn = (momentToFormat: Moment) => string;
|
117 |
|
118 | interface LocaleSpecification {
|
119 | months?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
|
120 | monthsShort?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
|
121 |
|
122 | weekdays?: string[] | StandaloneFormatSpec | MonthWeekdayFn;
|
123 | weekdaysShort?: string[] | StandaloneFormatSpec | WeekdaySimpleFn;
|
124 | weekdaysMin?: string[] | StandaloneFormatSpec | WeekdaySimpleFn;
|
125 |
|
126 | meridiemParse?: RegExp;
|
127 | meridiem?: (hour: number, minute:number, isLower: boolean) => string;
|
128 |
|
129 | isPM?: (input: string) => boolean;
|
130 |
|
131 | longDateFormat?: LongDateFormatSpec;
|
132 | calendar?: CalendarSpec;
|
133 | relativeTime?: RelativeTimeSpec;
|
134 | invalidDate?: string;
|
135 | ordinal?: (n: number) => string;
|
136 | ordinalParse?: RegExp;
|
137 |
|
138 | week?: WeekSpec;
|
139 |
|
140 |
|
141 |
|
142 | [x: string]: any;
|
143 | }
|
144 |
|
145 | interface MomentObjectOutput {
|
146 | years: number;
|
147 |
|
148 | months: number;
|
149 |
|
150 | date: number;
|
151 | hours: number;
|
152 | minutes: number;
|
153 | seconds: number;
|
154 | milliseconds: number;
|
155 | }
|
156 |
|
157 | interface Duration {
|
158 | clone(): Duration;
|
159 |
|
160 | humanize(withSuffix?: boolean): string;
|
161 |
|
162 | abs(): Duration;
|
163 |
|
164 | as(units: unitOfTime.Base): number;
|
165 | get(units: unitOfTime.Base): number;
|
166 |
|
167 | milliseconds(): number;
|
168 | asMilliseconds(): number;
|
169 |
|
170 | seconds(): number;
|
171 | asSeconds(): number;
|
172 |
|
173 | minutes(): number;
|
174 | asMinutes(): number;
|
175 |
|
176 | hours(): number;
|
177 | asHours(): number;
|
178 |
|
179 | days(): number;
|
180 | asDays(): number;
|
181 |
|
182 | weeks(): number;
|
183 | asWeeks(): number;
|
184 |
|
185 | months(): number;
|
186 | asMonths(): number;
|
187 |
|
188 | years(): number;
|
189 | asYears(): number;
|
190 |
|
191 | add(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
|
192 | subtract(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
|
193 |
|
194 | locale(): string;
|
195 | locale(locale: LocaleSpecifier): Duration;
|
196 | localeData(): Locale;
|
197 |
|
198 | toISOString(): string;
|
199 | toJSON(): string;
|
200 |
|
201 | isValid(): boolean;
|
202 |
|
203 | |
204 |
|
205 |
|
206 | lang(locale: LocaleSpecifier): Moment;
|
207 | |
208 |
|
209 |
|
210 | lang(): Locale;
|
211 | |
212 |
|
213 |
|
214 | toIsoString(): string;
|
215 | }
|
216 |
|
217 | interface MomentRelativeTime {
|
218 | future: any;
|
219 | past: any;
|
220 | s: any;
|
221 | ss: any;
|
222 | m: any;
|
223 | mm: any;
|
224 | h: any;
|
225 | hh: any;
|
226 | d: any;
|
227 | dd: any;
|
228 | M: any;
|
229 | MM: any;
|
230 | y: any;
|
231 | yy: any;
|
232 | }
|
233 |
|
234 | interface MomentLongDateFormat {
|
235 | L: string;
|
236 | LL: string;
|
237 | LLL: string;
|
238 | LLLL: string;
|
239 | LT: string;
|
240 | LTS: string;
|
241 |
|
242 | l?: string;
|
243 | ll?: string;
|
244 | lll?: string;
|
245 | llll?: string;
|
246 | lt?: string;
|
247 | lts?: string;
|
248 | }
|
249 |
|
250 | interface MomentParsingFlags {
|
251 | empty: boolean;
|
252 | unusedTokens: string[];
|
253 | unusedInput: string[];
|
254 | overflow: number;
|
255 | charsLeftOver: number;
|
256 | nullInput: boolean;
|
257 | invalidMonth: string | void;
|
258 | invalidFormat: boolean;
|
259 | userInvalidated: boolean;
|
260 | iso: boolean;
|
261 | parsedDateParts: any[];
|
262 | meridiem: string | void;
|
263 | }
|
264 |
|
265 | interface MomentParsingFlagsOpt {
|
266 | empty?: boolean;
|
267 | unusedTokens?: string[];
|
268 | unusedInput?: string[];
|
269 | overflow?: number;
|
270 | charsLeftOver?: number;
|
271 | nullInput?: boolean;
|
272 | invalidMonth?: string;
|
273 | invalidFormat?: boolean;
|
274 | userInvalidated?: boolean;
|
275 | iso?: boolean;
|
276 | parsedDateParts?: any[];
|
277 | meridiem?: string;
|
278 | }
|
279 |
|
280 | interface MomentBuiltinFormat {
|
281 | __momentBuiltinFormatBrand: any;
|
282 | }
|
283 |
|
284 | type MomentFormatSpecification = string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[];
|
285 |
|
286 | namespace unitOfTime {
|
287 | type Base = (
|
288 | "year" | "years" | "y" |
|
289 | "month" | "months" | "M" |
|
290 | "week" | "weeks" | "w" |
|
291 | "day" | "days" | "d" |
|
292 | "hour" | "hours" | "h" |
|
293 | "minute" | "minutes" | "m" |
|
294 | "second" | "seconds" | "s" |
|
295 | "millisecond" | "milliseconds" | "ms"
|
296 | );
|
297 |
|
298 | type _quarter = "quarter" | "quarters" | "Q";
|
299 | type _isoWeek = "isoWeek" | "isoWeeks" | "W";
|
300 | type _date = "date" | "dates" | "D";
|
301 | type DurationConstructor = Base | _quarter;
|
302 |
|
303 | type DurationAs = Base;
|
304 |
|
305 | type StartOf = Base | _quarter | _isoWeek | _date | void;
|
306 |
|
307 | type Diff = Base | _quarter;
|
308 |
|
309 | type MomentConstructor = Base | _date;
|
310 |
|
311 | type All = Base | _quarter | _isoWeek | _date |
|
312 | "weekYear" | "weekYears" | "gg" |
|
313 | "isoWeekYear" | "isoWeekYears" | "GG" |
|
314 | "dayOfYear" | "dayOfYears" | "DDD" |
|
315 | "weekday" | "weekdays" | "e" |
|
316 | "isoWeekday" | "isoWeekdays" | "E";
|
317 | }
|
318 |
|
319 | interface MomentInputObject {
|
320 | years?: number;
|
321 | year?: number;
|
322 | y?: number;
|
323 |
|
324 | months?: number;
|
325 | month?: number;
|
326 | M?: number;
|
327 |
|
328 | days?: number;
|
329 | day?: number;
|
330 | d?: number;
|
331 |
|
332 | dates?: number;
|
333 | date?: number;
|
334 | D?: number;
|
335 |
|
336 | hours?: number;
|
337 | hour?: number;
|
338 | h?: number;
|
339 |
|
340 | minutes?: number;
|
341 | minute?: number;
|
342 | m?: number;
|
343 |
|
344 | seconds?: number;
|
345 | second?: number;
|
346 | s?: number;
|
347 |
|
348 | milliseconds?: number;
|
349 | millisecond?: number;
|
350 | ms?: number;
|
351 | }
|
352 |
|
353 | interface DurationInputObject extends MomentInputObject {
|
354 | quarters?: number;
|
355 | quarter?: number;
|
356 | Q?: number;
|
357 |
|
358 | weeks?: number;
|
359 | week?: number;
|
360 | w?: number;
|
361 | }
|
362 |
|
363 | interface MomentSetObject extends MomentInputObject {
|
364 | weekYears?: number;
|
365 | weekYear?: number;
|
366 | gg?: number;
|
367 |
|
368 | isoWeekYears?: number;
|
369 | isoWeekYear?: number;
|
370 | GG?: number;
|
371 |
|
372 | quarters?: number;
|
373 | quarter?: number;
|
374 | Q?: number;
|
375 |
|
376 | weeks?: number;
|
377 | week?: number;
|
378 | w?: number;
|
379 |
|
380 | isoWeeks?: number;
|
381 | isoWeek?: number;
|
382 | W?: number;
|
383 |
|
384 | dayOfYears?: number;
|
385 | dayOfYear?: number;
|
386 | DDD?: number;
|
387 |
|
388 | weekdays?: number;
|
389 | weekday?: number;
|
390 | e?: number;
|
391 |
|
392 | isoWeekdays?: number;
|
393 | isoWeekday?: number;
|
394 | E?: number;
|
395 | }
|
396 |
|
397 | interface FromTo {
|
398 | from: MomentInput;
|
399 | to: MomentInput;
|
400 | }
|
401 |
|
402 | type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void;
|
403 | type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | void;
|
404 | type DurationInputArg2 = unitOfTime.DurationConstructor;
|
405 | type LocaleSpecifier = string | Moment | Duration | string[] | boolean;
|
406 |
|
407 | interface MomentCreationData {
|
408 | input: MomentInput;
|
409 | format?: MomentFormatSpecification;
|
410 | locale: Locale;
|
411 | isUTC: boolean;
|
412 | strict?: boolean;
|
413 | }
|
414 |
|
415 | interface Moment extends Object {
|
416 | format(format?: string): string;
|
417 |
|
418 | startOf(unitOfTime: unitOfTime.StartOf): Moment;
|
419 | endOf(unitOfTime: unitOfTime.StartOf): Moment;
|
420 |
|
421 | add(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment;
|
422 | |
423 |
|
424 |
|
425 | add(unit: unitOfTime.DurationConstructor, amount: number|string): Moment;
|
426 |
|
427 | subtract(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment;
|
428 | |
429 |
|
430 |
|
431 | subtract(unit: unitOfTime.DurationConstructor, amount: number|string): Moment;
|
432 |
|
433 | calendar(time?: MomentInput, formats?: CalendarSpec): string;
|
434 |
|
435 | clone(): Moment;
|
436 |
|
437 | |
438 |
|
439 |
|
440 | valueOf(): number;
|
441 |
|
442 |
|
443 | local(keepLocalTime?: boolean): Moment;
|
444 | isLocal(): boolean;
|
445 |
|
446 |
|
447 | utc(keepLocalTime?: boolean): Moment;
|
448 | isUTC(): boolean;
|
449 | |
450 |
|
451 |
|
452 | isUtc(): boolean;
|
453 |
|
454 | parseZone(): Moment;
|
455 | isValid(): boolean;
|
456 | invalidAt(): number;
|
457 |
|
458 | hasAlignedHourOffset(other?: MomentInput): boolean;
|
459 |
|
460 | creationData(): MomentCreationData;
|
461 | parsingFlags(): MomentParsingFlags;
|
462 |
|
463 | year(y: number): Moment;
|
464 | year(): number;
|
465 | |
466 |
|
467 |
|
468 | years(y: number): Moment;
|
469 | |
470 |
|
471 |
|
472 | years(): number;
|
473 | quarter(): number;
|
474 | quarter(q: number): Moment;
|
475 | quarters(): number;
|
476 | quarters(q: number): Moment;
|
477 | month(M: number|string): Moment;
|
478 | month(): number;
|
479 | |
480 |
|
481 |
|
482 | months(M: number|string): Moment;
|
483 | |
484 |
|
485 |
|
486 | months(): number;
|
487 | day(d: number|string): Moment;
|
488 | day(): number;
|
489 | days(d: number|string): Moment;
|
490 | days(): number;
|
491 | date(d: number): Moment;
|
492 | date(): number;
|
493 | |
494 |
|
495 |
|
496 | dates(d: number): Moment;
|
497 | |
498 |
|
499 |
|
500 | dates(): number;
|
501 | hour(h: number): Moment;
|
502 | hour(): number;
|
503 | hours(h: number): Moment;
|
504 | hours(): number;
|
505 | minute(m: number): Moment;
|
506 | minute(): number;
|
507 | minutes(m: number): Moment;
|
508 | minutes(): number;
|
509 | second(s: number): Moment;
|
510 | second(): number;
|
511 | seconds(s: number): Moment;
|
512 | seconds(): number;
|
513 | millisecond(ms: number): Moment;
|
514 | millisecond(): number;
|
515 | milliseconds(ms: number): Moment;
|
516 | milliseconds(): number;
|
517 | weekday(): number;
|
518 | weekday(d: number): Moment;
|
519 | isoWeekday(): number;
|
520 | isoWeekday(d: number|string): Moment;
|
521 | weekYear(): number;
|
522 | weekYear(d: number): Moment;
|
523 | isoWeekYear(): number;
|
524 | isoWeekYear(d: number): Moment;
|
525 | week(): number;
|
526 | week(d: number): Moment;
|
527 | weeks(): number;
|
528 | weeks(d: number): Moment;
|
529 | isoWeek(): number;
|
530 | isoWeek(d: number): Moment;
|
531 | isoWeeks(): number;
|
532 | isoWeeks(d: number): Moment;
|
533 | weeksInYear(): number;
|
534 | isoWeeksInYear(): number;
|
535 | dayOfYear(): number;
|
536 | dayOfYear(d: number): Moment;
|
537 |
|
538 | from(inp: MomentInput, suffix?: boolean): string;
|
539 | to(inp: MomentInput, suffix?: boolean): string;
|
540 | fromNow(withoutSuffix?: boolean): string;
|
541 | toNow(withoutPrefix?: boolean): string;
|
542 |
|
543 | diff(b: MomentInput, unitOfTime?: unitOfTime.Diff, precise?: boolean): number;
|
544 |
|
545 | toArray(): number[];
|
546 | toDate(): Date;
|
547 | toISOString(keepOffset?: boolean): string;
|
548 | inspect(): string;
|
549 | toJSON(): string;
|
550 | unix(): number;
|
551 |
|
552 | isLeapYear(): boolean;
|
553 | |
554 |
|
555 |
|
556 | zone(): number;
|
557 | zone(b: number|string): Moment;
|
558 | utcOffset(): number;
|
559 | utcOffset(b: number|string, keepLocalTime?: boolean): Moment;
|
560 | isUtcOffset(): boolean;
|
561 | daysInMonth(): number;
|
562 | isDST(): boolean;
|
563 |
|
564 | zoneAbbr(): string;
|
565 | zoneName(): string;
|
566 |
|
567 | isBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
|
568 | isAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
|
569 | isSame(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
|
570 | isSameOrAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
|
571 | isSameOrBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean;
|
572 | isBetween(a: MomentInput, b: MomentInput, granularity?: unitOfTime.StartOf, inclusivity?: "()" | "[)" | "(]" | "[]"): boolean;
|
573 |
|
574 | |
575 |
|
576 |
|
577 | lang(language: LocaleSpecifier): Moment;
|
578 | |
579 |
|
580 |
|
581 | lang(): Locale;
|
582 |
|
583 | locale(): string;
|
584 | locale(locale: LocaleSpecifier): Moment;
|
585 |
|
586 | localeData(): Locale;
|
587 |
|
588 | |
589 |
|
590 |
|
591 | isDSTShifted(): boolean;
|
592 |
|
593 |
|
594 | |
595 |
|
596 |
|
597 | max(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
|
598 | |
599 |
|
600 |
|
601 | max(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
|
602 |
|
603 |
|
604 | |
605 |
|
606 |
|
607 | min(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
|
608 | |
609 |
|
610 |
|
611 | min(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
|
612 |
|
613 | get(unit: unitOfTime.All): number;
|
614 | set(unit: unitOfTime.All, value: number): Moment;
|
615 | set(objectLiteral: MomentSetObject): Moment;
|
616 |
|
617 | toObject(): MomentObjectOutput;
|
618 | }
|
619 |
|
620 | export var version: string;
|
621 | export var fn: Moment;
|
622 |
|
623 |
|
624 | export function utc(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
|
625 | export function utc(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
|
626 |
|
627 | export function unix(timestamp: number): Moment;
|
628 |
|
629 | export function invalid(flags?: MomentParsingFlagsOpt): Moment;
|
630 | export function isMoment(m: any): m is Moment;
|
631 | export function isDate(m: any): m is Date;
|
632 | export function isDuration(d: any): d is Duration;
|
633 |
|
634 | |
635 |
|
636 |
|
637 | export function lang(language?: string): string;
|
638 | |
639 |
|
640 |
|
641 | export function lang(language?: string, definition?: Locale): string;
|
642 |
|
643 | export function locale(language?: string): string;
|
644 | export function locale(language?: string[]): string;
|
645 | export function locale(language?: string, definition?: LocaleSpecification | void): string;
|
646 |
|
647 | export function localeData(key?: string | string[]): Locale;
|
648 |
|
649 | export function duration(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration;
|
650 |
|
651 |
|
652 | export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment;
|
653 | export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment;
|
654 |
|
655 | export function months(): string[];
|
656 | export function months(index: number): string;
|
657 | export function months(format: string): string[];
|
658 | export function months(format: string, index: number): string;
|
659 | export function monthsShort(): string[];
|
660 | export function monthsShort(index: number): string;
|
661 | export function monthsShort(format: string): string[];
|
662 | export function monthsShort(format: string, index: number): string;
|
663 |
|
664 | export function weekdays(): string[];
|
665 | export function weekdays(index: number): string;
|
666 | export function weekdays(format: string): string[];
|
667 | export function weekdays(format: string, index: number): string;
|
668 | export function weekdays(localeSorted: boolean): string[];
|
669 | export function weekdays(localeSorted: boolean, index: number): string;
|
670 | export function weekdays(localeSorted: boolean, format: string): string[];
|
671 | export function weekdays(localeSorted: boolean, format: string, index: number): string;
|
672 | export function weekdaysShort(): string[];
|
673 | export function weekdaysShort(index: number): string;
|
674 | export function weekdaysShort(format: string): string[];
|
675 | export function weekdaysShort(format: string, index: number): string;
|
676 | export function weekdaysShort(localeSorted: boolean): string[];
|
677 | export function weekdaysShort(localeSorted: boolean, index: number): string;
|
678 | export function weekdaysShort(localeSorted: boolean, format: string): string[];
|
679 | export function weekdaysShort(localeSorted: boolean, format: string, index: number): string;
|
680 | export function weekdaysMin(): string[];
|
681 | export function weekdaysMin(index: number): string;
|
682 | export function weekdaysMin(format: string): string[];
|
683 | export function weekdaysMin(format: string, index: number): string;
|
684 | export function weekdaysMin(localeSorted: boolean): string[];
|
685 | export function weekdaysMin(localeSorted: boolean, index: number): string;
|
686 | export function weekdaysMin(localeSorted: boolean, format: string): string[];
|
687 | export function weekdaysMin(localeSorted: boolean, format: string, index: number): string;
|
688 |
|
689 | export function min(moments: Moment[]): Moment;
|
690 | export function min(...moments: Moment[]): Moment;
|
691 | export function max(moments: Moment[]): Moment;
|
692 | export function max(...moments: Moment[]): Moment;
|
693 |
|
694 | |
695 |
|
696 |
|
697 | export function now(): number;
|
698 |
|
699 | export function defineLocale(language: string, localeSpec: LocaleSpecification | void): Locale;
|
700 | export function updateLocale(language: string, localeSpec: LocaleSpecification | void): Locale;
|
701 |
|
702 | export function locales(): string[];
|
703 |
|
704 | export function normalizeUnits(unit: unitOfTime.All): string;
|
705 | export function relativeTimeThreshold(threshold: string): number | boolean;
|
706 | export function relativeTimeThreshold(threshold: string, limit: number): boolean;
|
707 | export function relativeTimeRounding(fn: (num: number) => number): boolean;
|
708 | export function relativeTimeRounding(): (num: number) => number;
|
709 | export function calendarFormat(m: Moment, now: Moment): string;
|
710 |
|
711 | export function parseTwoDigitYear(input: string): number;
|
712 |
|
713 | |
714 |
|
715 |
|
716 | export var ISO_8601: MomentBuiltinFormat;
|
717 | export var RFC_2822: MomentBuiltinFormat;
|
718 |
|
719 | export var defaultFormat: string;
|
720 | export var defaultFormatUtc: string;
|
721 |
|
722 | export var HTML5_FMT: {
|
723 | DATETIME_LOCAL: string,
|
724 | DATETIME_LOCAL_SECONDS: string,
|
725 | DATETIME_LOCAL_MS: string,
|
726 | DATE: string,
|
727 | TIME: string,
|
728 | TIME_SECONDS: string,
|
729 | TIME_MS: string,
|
730 | WEEK: string,
|
731 | MONTH: string
|
732 | };
|
733 |
|
734 | }
|
735 |
|
736 | export = moment;
|