commit 191aef79e386e193f7dd9285c72b1ba3d0f04a99
parent 587907404cec968b977b7b6df7a02f01285e1027
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 20 May 2025 14:14:12 +0200
support time specs with 'w' for weeks and 'y' for years as well
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/contrib/gana b/contrib/gana
@@ -0,0 +1 @@
+Subproject commit 347540125ce6ed0dd61bb46725840fe9a8f52867
diff --git a/src/lib/util/strings.c b/src/lib/util/strings.c
@@ -277,10 +277,12 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time,
{ "d", 24 * 60 * 60 * 1000LL * 1000LL },
{ "day", 24 * 60 * 60 * 1000LL * 1000LL },
{ "days", 24 * 60 * 60 * 1000LL * 1000LL },
+ { "w", 7 * 24 * 60 * 60 * 1000LL * 1000LL },
{ "week", 7 * 24 * 60 * 60 * 1000LL * 1000LL },
{ "weeks", 7 * 24 * 60 * 60 * 1000LL * 1000LL },
{ "year", 31536000000000LL /* year */ },
{ "years", 31536000000000LL /* year */ },
+ { "y", 31536000000000LL /* year */ },
{ "a", 31536000000000LL /* year */ },
{ NULL, 0 } };
int ret;