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:
parent
b0a6e1d448
commit
2d89d33668
@ -396,7 +396,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end)
|
|||||||
struct tm *lt;
|
struct tm *lt;
|
||||||
time_t t;
|
time_t t;
|
||||||
|
|
||||||
if (o->start < day && type == APPT)
|
if (o->start < day)
|
||||||
(void)strncpy (start, "..:..", 6);
|
(void)strncpy (start, "..:..", 6);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -404,7 +404,7 @@ apoint_sec2str (struct apoint *o, int type, long day, char *start, char *end)
|
|||||||
lt = localtime (&t);
|
lt = localtime (&t);
|
||||||
(void)snprintf (start, HRMIN_SIZE, "%02u:%02u", lt->tm_hour, lt->tm_min);
|
(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);
|
(void)strncpy (end, "..:..", 6);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user