]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[bugfix] Add 'w' to supported time units (#5526)
authorArno Gau <tetranoir@users.noreply.github.com>
Tue, 19 May 2020 10:57:42 +0000 (03:57 -0700)
committerKunal Marwaha <marwahaha@berkeley.edu>
Tue, 19 May 2020 10:59:23 +0000 (03:59 -0700)
Add 'w' to supported time unit

moment.d.ts

index 89ab02fc79374e9b0dd8af560383b589a686d3d6..379a824449ae3e2ab1275b6a775b617652200908 100644 (file)
@@ -17,7 +17,7 @@ declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSp
 declare function moment(inp?: moment.MomentInput, format?: moment.MomentFormatSpecification, language?: string, strict?: boolean): moment.Moment;
 
 declare namespace moment {
-  type RelativeTimeKey = 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'M' | 'MM' | 'y' | 'yy';
+  type RelativeTimeKey = 's' | 'ss' | 'm' | 'mm' | 'h' | 'hh' | 'd' | 'dd' | 'w' | 'M' | 'MM' | 'y' | 'yy';
   type CalendarKey = 'sameDay' | 'nextDay' | 'lastDay' | 'nextWeek' | 'lastWeek' | 'sameElse' | string;
   type LongDateFormatKey = 'LTS' | 'LT' | 'L' | 'LL' | 'LLL' | 'LLLL' | 'lts' | 'lt' | 'l' | 'll' | 'lll' | 'llll';
 
@@ -104,6 +104,7 @@ declare namespace moment {
     hh?: RelativeTimeSpecVal;
     d?: RelativeTimeSpecVal;
     dd?: RelativeTimeSpecVal;
+    w?: RelativeTimeSpecVal
     M?: RelativeTimeSpecVal;
     MM?: RelativeTimeSpecVal;
     y?: RelativeTimeSpecVal;