diff options
Diffstat (limited to 'src/pcal.c')
-rw-r--r-- | src/pcal.c | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -1,7 +1,7 @@ /* * Calcurse - text-based organizer * - * Copyright (c) 2004-2017 calcurse Development Team <misc@calcurse.org> + * Copyright (c) 2004-2023 calcurse Development Team <misc@calcurse.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,24 +56,22 @@ typedef void (*cb_dump_t) (FILE *, long, long, char *); */ static void foreach_date_dump(const long date_end, struct rpt *rpt, llist_t * exc, - long item_first_date, long item_dur, char *item_mesg, + long item_start, long item_dur, char *item_mesg, cb_dump_t cb_dump, FILE * stream) { long date, item_time; struct tm lt; time_t t; - t = item_first_date; + t = item_start; localtime_r(&t, <); lt.tm_hour = lt.tm_min = lt.tm_sec = 0; lt.tm_isdst = -1; date = mktime(<); - item_time = item_first_date - date; + item_time = item_start - date; while (date <= date_end && date <= rpt->until) { - if (recur_item_inday - (item_first_date, item_dur, exc, rpt->type, rpt->freq, - rpt->until, date)) { + if (recur_item_inday(item_start, item_dur, rpt, exc, date)) { (*cb_dump) (stream, date + item_time, item_dur, item_mesg); } @@ -104,8 +102,8 @@ static void pcal_export_header(FILE * stream) { fputs("# calcurse pcal export\n", stream); fputs("\n# =======\n# options\n# =======\n", stream); - fprintf(stream, "opt -A -K -l -m -F %s\n", - ui_calendar_week_begins_on_monday()? "Monday" : "Sunday"); + fprintf(stream, "opt -A -K -l -m -F %s\n", get_wday_default_string( + ui_calendar_get_wday_start())); fputs("# Display week number (i.e. 1-52) on every Monday\n", stream); fprintf(stream, "all monday in all week %%w\n"); |