diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-03-16 12:48:45 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-03-16 12:48:45 +0100 |
commit | cec79a3f5578da4a9f9085282389482edf45c81b (patch) | |
tree | 5c45f5efee77f9f8d84c3a1c7e02b12b6725a2e3 /src/tc-string.c | |
parent | 677e5b0b948fe62d8017c198c57049275f6fe61a (diff) |
New upstream version 4.26upstream/4.26upstream
Diffstat (limited to 'src/tc-string.c')
-rw-r--r-- | src/tc-string.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tc-string.c b/src/tc-string.c index e7f90c2..d777268 100644 --- a/src/tc-string.c +++ b/src/tc-string.c @@ -355,8 +355,16 @@ static int t_time_units(void) static const struct { unsigned long long input; unsigned int flags; - const char expect_out[24]; + const char expect_out[41]; } vt[] = { +#define SECONDS_PER_YEAR 31557600 /* 365.25 days */ +#define SECONDS_PER_MONTH 2629800 /* 1/12th of that year = 30.4375 days */ + {18446744073709551615ULL, 0, "213503982334601d7h15s"}, + {18446744073709526399ULL, 0, "213503982334600d23h59min59s"}, + {18446744073709180799ULL, HXUNIT_WEEKS, "30500568904942weeks2d23h59min59s"}, + {18446744073708451799ULL, HXUNIT_MONTHS, "7014504553087months2d23h59min59s"}, + {18446744073707636399ULL, HXUNIT_MONTHS | HXUNIT_WEEKS, "7014504553086months3weeks2d23h59min59s"}, + {18446744073688622999ULL, HXUNIT_YEARS | HXUNIT_MONTHS | HXUNIT_WEEKS, "584542046089y11months2weeks2d23h59min59s"}, {31536000, 0, "365d"}, {31622400, 0, "366d"}, {34819200, HXUNIT_WEEKS, "57weeks4d"}, |