src/apoint.c: Format recurrent multi-day items properly

Enable "..:.." formatting for recurrent appointments that last beyond
midnight. Apart from our recurrent item handler being a tad broken,
there is no reason not to do the same thing we already do with regular
appointments here.

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-10-06 09:56:29 +02:00
parent b0a6e1d448
commit 2d89d33668

View File

@ -396,7 +396,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end)
struct tm *lt;
time_t t;
if (o->start < day && type == APPT)
if (o->start < day)
(void)strncpy (start, "..:..", 6);
else
{
@ -404,7 +404,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end)
lt = localtime (&t);
(void)snprintf (start, HRMIN_SIZE, "%02u:%02u", lt->tm_hour, lt->tm_min);
}
if (o->start + o->dur > day + DAYINSEC && type == APPT)
if (o->start + o->dur > day + DAYINSEC)
(void)strncpy (end, "..:..", 6);
else
{