From 13fb0ad8e3a265df8fc79f9171b214374d8f5be1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 27 Jan 2020 14:29:51 +0100 Subject: [PATCH] ENH: Add new interval hint :fortnight (sopw - eow). --- doc/man7/timew-hints.7.in | 1 + src/helper.cpp | 1 + src/init.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/doc/man7/timew-hints.7.in b/doc/man7/timew-hints.7.in index df6a0448..f48e154a 100644 --- a/doc/man7/timew-hints.7.in +++ b/doc/man7/timew-hints.7.in @@ -37,6 +37,7 @@ Range hints provide convenient shortcuts to date ranges: :yesterday The 24 hours of the previous day :day The 24 hours of the current day :week This week + :fortnight This week and the one before :month This month :quarter This quarter :year This year diff --git a/src/helper.cpp b/src/helper.cpp index 58c0b0bc..ff762c46 100644 --- a/src/helper.cpp +++ b/src/helper.cpp @@ -147,6 +147,7 @@ bool expandIntervalHint ( {":yesterday", {"yesterday", "today"}}, {":day", {"today", "eod"}}, {":week", {"sow", "eow"}}, + {":fortnight", {"sopw", "eow"}}, {":month", {"som", "eom"}}, {":quarter", {"soq", "eoq"}}, {":year", {"soy", "eoy"}}, diff --git a/src/init.cpp b/src/init.cpp index 55b3f7c4..c7f76d32 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -105,6 +105,7 @@ void initializeEntities (CLI& cli) cli.entity ("hint", ":quarter"); cli.entity ("hint", ":quiet"); cli.entity ("hint", ":week"); + cli.entity ("hint", ":fortnight"); cli.entity ("hint", ":year"); cli.entity ("hint", ":yes"); cli.entity ("hint", ":yesterday");