From cbaf57bec3564340f34450b0efa07dfab50caeb0 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Tue, 4 Jul 2023 22:57:50 +0200 Subject: [PATCH] add some constants to the Date class --- src/date/date.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/date/date.h b/src/date/date.h index e824764..9da4f93 100644 --- a/src/date/date.h +++ b/src/date/date.h @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2012-2022, Tomasz Sowa + * Copyright (c) 2012-2023, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -60,6 +60,11 @@ class Date { public: + static const time_t ONE_MIN = 60; /* one minute in seconds */ + static const time_t ONE_HOUR = ONE_MIN * 60; /* one hour in seconds */ + static const time_t ONE_DAY = ONE_HOUR * 24; /* one day in seconds */ + static const time_t ONE_WEEK = ONE_DAY * 7; /* one week in seconds */ + /* the date