diff options
author | Preston Pan <ret2pop@gmail.com> | 2025-01-30 21:02:42 -0800 |
---|---|---|
committer | Preston Pan <ret2pop@gmail.com> | 2025-01-30 21:02:42 -0800 |
commit | 3780f207f924f14734cb839fd015bd883fe52ff1 (patch) | |
tree | de13568dbf97ffe477943854bcb3ea6001b46cf8 /src/common/protocol.c | |
parent | ef9ab1fd141f4057d41f2d6ed8ab8d67c44894d5 (diff) |
Diffstat (limited to 'src/common/protocol.c')
-rw-r--r-- | src/common/protocol.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/common/protocol.c b/src/common/protocol.c deleted file mode 100644 index 9be3bcf..0000000 --- a/src/common/protocol.c +++ /dev/null @@ -1,20 +0,0 @@ -#include "../include/protocol.h" -#include "../include/better_string.h" - -#include <stdlib.h> -#include <stdbool.h> -#include <time.h> - -string_t *date_str() { - char dateStr[11]; - time_t t = time(NULL); - struct tm *tm_info = localtime(&t); - - strftime(dateStr, sizeof(dateStr), "%d-%m-%Y", tm_info); - return init_string(dateStr); -} - -bool same_day(struct tm *date1, struct tm *date2) { - return (date1->tm_year == date2->tm_year && date1->tm_mon == date2->tm_mon && - date1->tm_mday == date2->tm_mday); -} |