aboutsummaryrefslogtreecommitdiffstats
path: root/date.h
diff options
context:
space:
mode:
authorEl-BG-1970 <elouan.gros.fr@gmail.com>2022-03-16 22:00:03 +0100
committerEl-BG-1970 <elouan.gros.fr@gmail.com>2022-03-16 22:00:03 +0100
commit2fd7e3647e70e6a925993c59d8c1751a904ae39a (patch)
tree9d3c469c08fe60139d4ad82d3762f690b43478ed /date.h
parenta37ece490f4cf269a58afdadf6e51f62d8529a41 (diff)
downloadorg-to-conky-2fd7e3647e70e6a925993c59d8c1751a904ae39a.tar.gz
added "THIS WEEK" directive
Diffstat (limited to 'date.h')
-rw-r--r--date.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/date.h b/date.h
index 271f3cc..b692d48 100644
--- a/date.h
+++ b/date.h
@@ -12,8 +12,13 @@ typedef struct Date {
int weekday;
} Date;
-Date extract_date(char *str);
+int get_weekday_from_string(char *str);
+char *weekday_to_string(int weekday);
+
+Date extract_date(struct tm *localtm);
+Date extract_date_from_string(char *str);
Date adjust_date(Date date);
+
bool smaller(Date a, Date b);
bool strictly_smaller(Date a, Date b);
bool eql(Date a, Date b);
@@ -21,11 +26,13 @@ bool zero(Date a);
void print_date(Date date);
char *print_date_to_string(Date date);
+char *short_date_to_string(Date date);
Date today();
Date tomorrow(Date td);
Date nextweek(Date td);
Date nextmonth(Date td);
+Date nextmonday(Date td);
#define __DATE_H__
#endif