diff --git a/src/components/date/dateRanges.ts b/src/components/date/dateRanges.ts index c33d04262..40570be0f 100644 --- a/src/components/date/dateRanges.ts +++ b/src/components/date/dateRanges.ts @@ -1,10 +1,21 @@ -// TODO: more ranges! export const dateRanges = { - 'task.show.today': ['now/d', 'now/d+1d'], - 'task.show.thisWeek': ['now/w', 'now/w+1w'], - 'task.show.nextWeek': ['now/w+1w', 'now/w+2w'], - 'task.show.next7Days': ['now', 'now+7d'], - 'task.show.thisMonth': ['now/M', 'now/M+1M'], - 'task.show.nextMonth': ['now/M+1M', 'now/M+2M'], - 'task.show.next30Days': ['now', 'now+30d'], + // Format: + // Key is the title, as a translation string, the first entry of the value array + // is the "from" date, the second one is the "to" date. + 'today': ['now/d', 'now/d+1d'], + + 'lastWeek': ['now/w-1w', 'now/w-2w'], + 'thisWeek': ['now/w', 'now/w+1w'], + 'restOfThisWeek': ['now', 'now/w+1w'], + 'nextWeek': ['now/w+1w', 'now/w+2w'], + 'next7Days': ['now', 'now+7d'], + + 'lastMonth': ['now/M-1M', 'now/M-2M'], + 'thisMonth': ['now/M', 'now/M+1M'], + 'restOfThisMonth': ['now', 'now/M+1M'], + 'nextMonth': ['now/M+1M', 'now/M+2M'], + 'next30Days': ['now', 'now+30d'], + + 'thisYear': ['now/y', 'now/y+1y'], + 'restOfThisYear': ['now', 'now/y+1y'], } diff --git a/src/components/date/datepickerWithRange.vue b/src/components/date/datepickerWithRange.vue index 587b8409a..8b4b41cea 100644 --- a/src/components/date/datepickerWithRange.vue +++ b/src/components/date/datepickerWithRange.vue @@ -9,15 +9,15 @@