root / HServer / 00.Server / 00.Program / node_modules / moment / moment.d.ts
이력 | 보기 | 이력해설 | 다운로드 (20.2 KB)
1 | 39 | HKM | 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 | // Allow anything: in general any property that is passed as locale spec is |
||
141 | // put in the locale object so it can be used by locale functions |
||
142 | [x: string]: any; |
||
143 | } |
||
144 | |||
145 | interface MomentObjectOutput { |
||
146 | years: number; |
||
147 | /* One digit */ |
||
148 | months: number; |
||
149 | /* Day of the month */ |
||
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 | /** |
||
202 | * @deprecated since version 2.8.0 |
||
203 | */ |
||
204 | lang(locale: LocaleSpecifier): Moment; |
||
205 | /** |
||
206 | * @deprecated since version 2.8.0 |
||
207 | */ |
||
208 | lang(): Locale; |
||
209 | /** |
||
210 | * @deprecated |
||
211 | */ |
||
212 | toIsoString(): string; |
||
213 | } |
||
214 | |||
215 | interface MomentRelativeTime { |
||
216 | future: any; |
||
217 | past: any; |
||
218 | s: any; |
||
219 | ss: any; |
||
220 | m: any; |
||
221 | mm: any; |
||
222 | h: any; |
||
223 | hh: any; |
||
224 | d: any; |
||
225 | dd: any; |
||
226 | M: any; |
||
227 | MM: any; |
||
228 | y: any; |
||
229 | yy: any; |
||
230 | } |
||
231 | |||
232 | interface MomentLongDateFormat { |
||
233 | L: string; |
||
234 | LL: string; |
||
235 | LLL: string; |
||
236 | LLLL: string; |
||
237 | LT: string; |
||
238 | LTS: string; |
||
239 | |||
240 | l?: string; |
||
241 | ll?: string; |
||
242 | lll?: string; |
||
243 | llll?: string; |
||
244 | lt?: string; |
||
245 | lts?: string; |
||
246 | } |
||
247 | |||
248 | interface MomentParsingFlags { |
||
249 | empty: boolean; |
||
250 | unusedTokens: string[]; |
||
251 | unusedInput: string[]; |
||
252 | overflow: number; |
||
253 | charsLeftOver: number; |
||
254 | nullInput: boolean; |
||
255 | invalidMonth: string | void; // null |
||
256 | invalidFormat: boolean; |
||
257 | userInvalidated: boolean; |
||
258 | iso: boolean; |
||
259 | parsedDateParts: any[]; |
||
260 | meridiem: string | void; // null |
||
261 | } |
||
262 | |||
263 | interface MomentParsingFlagsOpt { |
||
264 | empty?: boolean; |
||
265 | unusedTokens?: string[]; |
||
266 | unusedInput?: string[]; |
||
267 | overflow?: number; |
||
268 | charsLeftOver?: number; |
||
269 | nullInput?: boolean; |
||
270 | invalidMonth?: string; |
||
271 | invalidFormat?: boolean; |
||
272 | userInvalidated?: boolean; |
||
273 | iso?: boolean; |
||
274 | parsedDateParts?: any[]; |
||
275 | meridiem?: string; |
||
276 | } |
||
277 | |||
278 | interface MomentBuiltinFormat { |
||
279 | __momentBuiltinFormatBrand: any; |
||
280 | } |
||
281 | |||
282 | type MomentFormatSpecification = string | MomentBuiltinFormat | (string | MomentBuiltinFormat)[]; |
||
283 | |||
284 | namespace unitOfTime { |
||
285 | type Base = ( |
||
286 | "year" | "years" | "y" | |
||
287 | "month" | "months" | "M" | |
||
288 | "week" | "weeks" | "w" | |
||
289 | "day" | "days" | "d" | |
||
290 | "hour" | "hours" | "h" | |
||
291 | "minute" | "minutes" | "m" | |
||
292 | "second" | "seconds" | "s" | |
||
293 | "millisecond" | "milliseconds" | "ms" |
||
294 | ); |
||
295 | |||
296 | type _quarter = "quarter" | "quarters" | "Q"; |
||
297 | type _isoWeek = "isoWeek" | "isoWeeks" | "W"; |
||
298 | type _date = "date" | "dates" | "D"; |
||
299 | type DurationConstructor = Base | _quarter; |
||
300 | |||
301 | type DurationAs = Base; |
||
302 | |||
303 | type StartOf = Base | _quarter | _isoWeek | _date; |
||
304 | |||
305 | type Diff = Base | _quarter; |
||
306 | |||
307 | type MomentConstructor = Base | _date; |
||
308 | |||
309 | type All = Base | _quarter | _isoWeek | _date | |
||
310 | "weekYear" | "weekYears" | "gg" | |
||
311 | "isoWeekYear" | "isoWeekYears" | "GG" | |
||
312 | "dayOfYear" | "dayOfYears" | "DDD" | |
||
313 | "weekday" | "weekdays" | "e" | |
||
314 | "isoWeekday" | "isoWeekdays" | "E"; |
||
315 | } |
||
316 | |||
317 | interface MomentInputObject { |
||
318 | years?: number; |
||
319 | year?: number; |
||
320 | y?: number; |
||
321 | |||
322 | months?: number; |
||
323 | month?: number; |
||
324 | M?: number; |
||
325 | |||
326 | days?: number; |
||
327 | day?: number; |
||
328 | d?: number; |
||
329 | |||
330 | dates?: number; |
||
331 | date?: number; |
||
332 | D?: number; |
||
333 | |||
334 | hours?: number; |
||
335 | hour?: number; |
||
336 | h?: number; |
||
337 | |||
338 | minutes?: number; |
||
339 | minute?: number; |
||
340 | m?: number; |
||
341 | |||
342 | seconds?: number; |
||
343 | second?: number; |
||
344 | s?: number; |
||
345 | |||
346 | milliseconds?: number; |
||
347 | millisecond?: number; |
||
348 | ms?: number; |
||
349 | } |
||
350 | |||
351 | interface DurationInputObject extends MomentInputObject { |
||
352 | quarters?: number; |
||
353 | quarter?: number; |
||
354 | Q?: number; |
||
355 | |||
356 | weeks?: number; |
||
357 | week?: number; |
||
358 | w?: number; |
||
359 | } |
||
360 | |||
361 | interface MomentSetObject extends MomentInputObject { |
||
362 | weekYears?: number; |
||
363 | weekYear?: number; |
||
364 | gg?: number; |
||
365 | |||
366 | isoWeekYears?: number; |
||
367 | isoWeekYear?: number; |
||
368 | GG?: number; |
||
369 | |||
370 | quarters?: number; |
||
371 | quarter?: number; |
||
372 | Q?: number; |
||
373 | |||
374 | weeks?: number; |
||
375 | week?: number; |
||
376 | w?: number; |
||
377 | |||
378 | isoWeeks?: number; |
||
379 | isoWeek?: number; |
||
380 | W?: number; |
||
381 | |||
382 | dayOfYears?: number; |
||
383 | dayOfYear?: number; |
||
384 | DDD?: number; |
||
385 | |||
386 | weekdays?: number; |
||
387 | weekday?: number; |
||
388 | e?: number; |
||
389 | |||
390 | isoWeekdays?: number; |
||
391 | isoWeekday?: number; |
||
392 | E?: number; |
||
393 | } |
||
394 | |||
395 | interface FromTo { |
||
396 | from: MomentInput; |
||
397 | to: MomentInput; |
||
398 | } |
||
399 | |||
400 | type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined |
||
401 | type DurationInputArg1 = Duration | number | string | FromTo | DurationInputObject | void; // null | undefined |
||
402 | type DurationInputArg2 = unitOfTime.DurationConstructor; |
||
403 | type LocaleSpecifier = string | Moment | Duration | string[] | boolean; |
||
404 | |||
405 | interface MomentCreationData { |
||
406 | input: MomentInput; |
||
407 | format?: MomentFormatSpecification; |
||
408 | locale: Locale; |
||
409 | isUTC: boolean; |
||
410 | strict?: boolean; |
||
411 | } |
||
412 | |||
413 | interface Moment extends Object { |
||
414 | format(format?: string): string; |
||
415 | |||
416 | startOf(unitOfTime: unitOfTime.StartOf): Moment; |
||
417 | endOf(unitOfTime: unitOfTime.StartOf): Moment; |
||
418 | |||
419 | add(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment; |
||
420 | /** |
||
421 | * @deprecated reverse syntax |
||
422 | */ |
||
423 | add(unit: unitOfTime.DurationConstructor, amount: number|string): Moment; |
||
424 | |||
425 | subtract(amount?: DurationInputArg1, unit?: DurationInputArg2): Moment; |
||
426 | /** |
||
427 | * @deprecated reverse syntax |
||
428 | */ |
||
429 | subtract(unit: unitOfTime.DurationConstructor, amount: number|string): Moment; |
||
430 | |||
431 | calendar(time?: MomentInput, formats?: CalendarSpec): string; |
||
432 | |||
433 | clone(): Moment; |
||
434 | |||
435 | /** |
||
436 | * @return Unix timestamp in milliseconds |
||
437 | */ |
||
438 | valueOf(): number; |
||
439 | |||
440 | // current date/time in local mode |
||
441 | local(keepLocalTime?: boolean): Moment; |
||
442 | isLocal(): boolean; |
||
443 | |||
444 | // current date/time in UTC mode |
||
445 | utc(keepLocalTime?: boolean): Moment; |
||
446 | isUTC(): boolean; |
||
447 | /** |
||
448 | * @deprecated use isUTC |
||
449 | */ |
||
450 | isUtc(): boolean; |
||
451 | |||
452 | parseZone(): Moment; |
||
453 | isValid(): boolean; |
||
454 | invalidAt(): number; |
||
455 | |||
456 | hasAlignedHourOffset(other?: MomentInput): boolean; |
||
457 | |||
458 | creationData(): MomentCreationData; |
||
459 | parsingFlags(): MomentParsingFlags; |
||
460 | |||
461 | year(y: number): Moment; |
||
462 | year(): number; |
||
463 | /** |
||
464 | * @deprecated use year(y) |
||
465 | */ |
||
466 | years(y: number): Moment; |
||
467 | /** |
||
468 | * @deprecated use year() |
||
469 | */ |
||
470 | years(): number; |
||
471 | quarter(): number; |
||
472 | quarter(q: number): Moment; |
||
473 | quarters(): number; |
||
474 | quarters(q: number): Moment; |
||
475 | month(M: number|string): Moment; |
||
476 | month(): number; |
||
477 | /** |
||
478 | * @deprecated use month(M) |
||
479 | */ |
||
480 | months(M: number|string): Moment; |
||
481 | /** |
||
482 | * @deprecated use month() |
||
483 | */ |
||
484 | months(): number; |
||
485 | day(d: number|string): Moment; |
||
486 | day(): number; |
||
487 | days(d: number|string): Moment; |
||
488 | days(): number; |
||
489 | date(d: number): Moment; |
||
490 | date(): number; |
||
491 | /** |
||
492 | * @deprecated use date(d) |
||
493 | */ |
||
494 | dates(d: number): Moment; |
||
495 | /** |
||
496 | * @deprecated use date() |
||
497 | */ |
||
498 | dates(): number; |
||
499 | hour(h: number): Moment; |
||
500 | hour(): number; |
||
501 | hours(h: number): Moment; |
||
502 | hours(): number; |
||
503 | minute(m: number): Moment; |
||
504 | minute(): number; |
||
505 | minutes(m: number): Moment; |
||
506 | minutes(): number; |
||
507 | second(s: number): Moment; |
||
508 | second(): number; |
||
509 | seconds(s: number): Moment; |
||
510 | seconds(): number; |
||
511 | millisecond(ms: number): Moment; |
||
512 | millisecond(): number; |
||
513 | milliseconds(ms: number): Moment; |
||
514 | milliseconds(): number; |
||
515 | weekday(): number; |
||
516 | weekday(d: number): Moment; |
||
517 | isoWeekday(): number; |
||
518 | isoWeekday(d: number|string): Moment; |
||
519 | weekYear(): number; |
||
520 | weekYear(d: number): Moment; |
||
521 | isoWeekYear(): number; |
||
522 | isoWeekYear(d: number): Moment; |
||
523 | week(): number; |
||
524 | week(d: number): Moment; |
||
525 | weeks(): number; |
||
526 | weeks(d: number): Moment; |
||
527 | isoWeek(): number; |
||
528 | isoWeek(d: number): Moment; |
||
529 | isoWeeks(): number; |
||
530 | isoWeeks(d: number): Moment; |
||
531 | weeksInYear(): number; |
||
532 | isoWeeksInYear(): number; |
||
533 | dayOfYear(): number; |
||
534 | dayOfYear(d: number): Moment; |
||
535 | |||
536 | from(inp: MomentInput, suffix?: boolean): string; |
||
537 | to(inp: MomentInput, suffix?: boolean): string; |
||
538 | fromNow(withoutSuffix?: boolean): string; |
||
539 | toNow(withoutPrefix?: boolean): string; |
||
540 | |||
541 | diff(b: MomentInput, unitOfTime?: unitOfTime.Diff, precise?: boolean): number; |
||
542 | |||
543 | toArray(): number[]; |
||
544 | toDate(): Date; |
||
545 | toISOString(keepOffset?: boolean): string; |
||
546 | inspect(): string; |
||
547 | toJSON(): string; |
||
548 | unix(): number; |
||
549 | |||
550 | isLeapYear(): boolean; |
||
551 | /** |
||
552 | * @deprecated in favor of utcOffset |
||
553 | */ |
||
554 | zone(): number; |
||
555 | zone(b: number|string): Moment; |
||
556 | utcOffset(): number; |
||
557 | utcOffset(b: number|string, keepLocalTime?: boolean): Moment; |
||
558 | isUtcOffset(): boolean; |
||
559 | daysInMonth(): number; |
||
560 | isDST(): boolean; |
||
561 | |||
562 | zoneAbbr(): string; |
||
563 | zoneName(): string; |
||
564 | |||
565 | isBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; |
||
566 | isAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; |
||
567 | isSame(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; |
||
568 | isSameOrAfter(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; |
||
569 | isSameOrBefore(inp?: MomentInput, granularity?: unitOfTime.StartOf): boolean; |
||
570 | isBetween(a: MomentInput, b: MomentInput, granularity?: unitOfTime.StartOf, inclusivity?: "()" | "[)" | "(]" | "[]"): boolean; |
||
571 | |||
572 | /** |
||
573 | * @deprecated as of 2.8.0, use locale |
||
574 | */ |
||
575 | lang(language: LocaleSpecifier): Moment; |
||
576 | /** |
||
577 | * @deprecated as of 2.8.0, use locale |
||
578 | */ |
||
579 | lang(): Locale; |
||
580 | |||
581 | locale(): string; |
||
582 | locale(locale: LocaleSpecifier): Moment; |
||
583 | |||
584 | localeData(): Locale; |
||
585 | |||
586 | /** |
||
587 | * @deprecated no reliable implementation |
||
588 | */ |
||
589 | isDSTShifted(): boolean; |
||
590 | |||
591 | // NOTE(constructor): Same as moment constructor |
||
592 | /** |
||
593 | * @deprecated as of 2.7.0, use moment.min/max |
||
594 | */ |
||
595 | max(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; |
||
596 | /** |
||
597 | * @deprecated as of 2.7.0, use moment.min/max |
||
598 | */ |
||
599 | max(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; |
||
600 | |||
601 | // NOTE(constructor): Same as moment constructor |
||
602 | /** |
||
603 | * @deprecated as of 2.7.0, use moment.min/max |
||
604 | */ |
||
605 | min(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; |
||
606 | /** |
||
607 | * @deprecated as of 2.7.0, use moment.min/max |
||
608 | */ |
||
609 | min(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; |
||
610 | |||
611 | get(unit: unitOfTime.All): number; |
||
612 | set(unit: unitOfTime.All, value: number): Moment; |
||
613 | set(objectLiteral: MomentSetObject): Moment; |
||
614 | |||
615 | toObject(): MomentObjectOutput; |
||
616 | } |
||
617 | |||
618 | export var version: string; |
||
619 | export var fn: Moment; |
||
620 | |||
621 | // NOTE(constructor): Same as moment constructor |
||
622 | export function utc(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; |
||
623 | export function utc(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; |
||
624 | |||
625 | export function unix(timestamp: number): Moment; |
||
626 | |||
627 | export function invalid(flags?: MomentParsingFlagsOpt): Moment; |
||
628 | export function isMoment(m: any): m is Moment; |
||
629 | export function isDate(m: any): m is Date; |
||
630 | export function isDuration(d: any): d is Duration; |
||
631 | |||
632 | /** |
||
633 | * @deprecated in 2.8.0 |
||
634 | */ |
||
635 | export function lang(language?: string): string; |
||
636 | /** |
||
637 | * @deprecated in 2.8.0 |
||
638 | */ |
||
639 | export function lang(language?: string, definition?: Locale): string; |
||
640 | |||
641 | export function locale(language?: string): string; |
||
642 | export function locale(language?: string[]): string; |
||
643 | export function locale(language?: string, definition?: LocaleSpecification | void): string; // null | undefined |
||
644 | |||
645 | export function localeData(key?: string | string[]): Locale; |
||
646 | |||
647 | export function duration(inp?: DurationInputArg1, unit?: DurationInputArg2): Duration; |
||
648 | |||
649 | // NOTE(constructor): Same as moment constructor |
||
650 | export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, strict?: boolean): Moment; |
||
651 | export function parseZone(inp?: MomentInput, format?: MomentFormatSpecification, language?: string, strict?: boolean): Moment; |
||
652 | |||
653 | export function months(): string[]; |
||
654 | export function months(index: number): string; |
||
655 | export function months(format: string): string[]; |
||
656 | export function months(format: string, index: number): string; |
||
657 | export function monthsShort(): string[]; |
||
658 | export function monthsShort(index: number): string; |
||
659 | export function monthsShort(format: string): string[]; |
||
660 | export function monthsShort(format: string, index: number): string; |
||
661 | |||
662 | export function weekdays(): string[]; |
||
663 | export function weekdays(index: number): string; |
||
664 | export function weekdays(format: string): string[]; |
||
665 | export function weekdays(format: string, index: number): string; |
||
666 | export function weekdays(localeSorted: boolean): string[]; |
||
667 | export function weekdays(localeSorted: boolean, index: number): string; |
||
668 | export function weekdays(localeSorted: boolean, format: string): string[]; |
||
669 | export function weekdays(localeSorted: boolean, format: string, index: number): string; |
||
670 | export function weekdaysShort(): string[]; |
||
671 | export function weekdaysShort(index: number): string; |
||
672 | export function weekdaysShort(format: string): string[]; |
||
673 | export function weekdaysShort(format: string, index: number): string; |
||
674 | export function weekdaysShort(localeSorted: boolean): string[]; |
||
675 | export function weekdaysShort(localeSorted: boolean, index: number): string; |
||
676 | export function weekdaysShort(localeSorted: boolean, format: string): string[]; |
||
677 | export function weekdaysShort(localeSorted: boolean, format: string, index: number): string; |
||
678 | export function weekdaysMin(): string[]; |
||
679 | export function weekdaysMin(index: number): string; |
||
680 | export function weekdaysMin(format: string): string[]; |
||
681 | export function weekdaysMin(format: string, index: number): string; |
||
682 | export function weekdaysMin(localeSorted: boolean): string[]; |
||
683 | export function weekdaysMin(localeSorted: boolean, index: number): string; |
||
684 | export function weekdaysMin(localeSorted: boolean, format: string): string[]; |
||
685 | export function weekdaysMin(localeSorted: boolean, format: string, index: number): string; |
||
686 | |||
687 | export function min(moments: Moment[]): Moment; |
||
688 | export function min(...moments: Moment[]): Moment; |
||
689 | export function max(moments: Moment[]): Moment; |
||
690 | export function max(...moments: Moment[]): Moment; |
||
691 | |||
692 | /** |
||
693 | * Returns unix time in milliseconds. Overwrite for profit. |
||
694 | */ |
||
695 | export function now(): number; |
||
696 | |||
697 | export function defineLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null |
||
698 | export function updateLocale(language: string, localeSpec: LocaleSpecification | void): Locale; // null |
||
699 | |||
700 | export function locales(): string[]; |
||
701 | |||
702 | export function normalizeUnits(unit: unitOfTime.All): string; |
||
703 | export function relativeTimeThreshold(threshold: string): number | boolean; |
||
704 | export function relativeTimeThreshold(threshold: string, limit: number): boolean; |
||
705 | export function relativeTimeRounding(fn: (num: number) => number): boolean; |
||
706 | export function relativeTimeRounding(): (num: number) => number; |
||
707 | export function calendarFormat(m: Moment, now: Moment): string; |
||
708 | |||
709 | /** |
||
710 | * Constant used to enable explicit ISO_8601 format parsing. |
||
711 | */ |
||
712 | export var ISO_8601: MomentBuiltinFormat; |
||
713 | export var RFC_2822: MomentBuiltinFormat; |
||
714 | |||
715 | export var defaultFormat: string; |
||
716 | export var defaultFormatUtc: string; |
||
717 | } |
||
718 | |||
719 | export = moment; |