summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-10-06 09:56:29 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2011-10-21 08:58:53 +0200
commit2d89d336689358ddc4aba9d28bc8b25b60c21f95 (patch)
tree87ef35acf19efbd9d67996a08d9188fa8286e4f1 /src
parentb0a6e1d4482499bbaa08238a8cb09b6f692556d6 (diff)
downloadcalcurse-2d89d336689358ddc4aba9d28bc8b25b60c21f95.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/apoint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apoint.c b/src/apoint.c
index 36851c3..56028ca 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -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
{