- commit
- 9efd6bb17d55e427b29241118d761c0408aae629
- parent
- 6c5cc94ae327a1e17b15b9ef5b0aa1d0a541d475
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-08-17 14:38
refactor: mv declaration to top
Diffstat
| M | calendar.c | 3 | +-- |
1 files changed, 1 insertions, 2 deletions
diff --git a/calendar.c b/calendar.c
@@ -244,6 +244,7 @@ void invalid_date(char *s) {
244 244 struct tpl parse_date(char *s) {
245 245 struct tm *TODAY = today();
246 246 struct tpl tpl = mktpl();
-1 247 struct tm match;
247 248
248 249 int n = 0;
249 250 if (strchr(s, '+')) {
@@ -278,8 +279,6 @@ struct tpl parse_date(char *s) {
278 279
279 280 bool star = strcmp(s + strlen(s) - strlen("*"), "*") == 0;
280 281
281 -1 struct tm match;
282 -1
283 282 /* weekday */
284 283 if (strptime(s, "%Y/%m/%a", &match)) {
285 284 tpl.month = match.tm_mon + 1;