Birthday entry type, relative dates, list/compact/cards views

- Task dialog: Appointment | Birthday switch. Birthday = name + "19.03." or
  "19.03.1986" (no time), live preview with weekday, age and days left
- Birthday folders open the birthday form; yearly tasks in such folders are
  migrated once
- Birthdays show "19. Maerz" instead of date + time; every task shows
  "in 15 days" / "3 days ago" (red when overdue)
- View switch: list, compact (one line), cards (calendar tiles), persisted
- ICS: birthdays as all-day events
- 59 tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-29 14:42:16 +01:00
parent 693d79019a
commit bb6612420d
28 changed files with 985 additions and 176 deletions

View File

@@ -28,9 +28,17 @@ namespace ReminderOrganizer.Services
Line("BEGIN:VEVENT");
Line($"UID:{t.Id}@reminder-organizer");
Line($"DTSTAMP:{stamp}");
// floating local time: shows at the same clock time in every calendar
Line($"DTSTART:{t.ReminderDate.ToString("yyyyMMdd'T'HHmmss", CultureInfo.InvariantCulture)}");
Line("DURATION:PT30M");
if (t.IsBirthday)
{
// all-day event
Line($"DTSTART;VALUE=DATE:{t.ReminderDate.ToString("yyyyMMdd", CultureInfo.InvariantCulture)}");
}
else
{
// floating local time: shows at the same clock time in every calendar
Line($"DTSTART:{t.ReminderDate.ToString("yyyyMMdd'T'HHmmss", CultureInfo.InvariantCulture)}");
Line("DURATION:PT30M");
}
var summary = t.UpcomingAge is int age ? $"{t.Name} ({age})" : t.Name;
Line($"SUMMARY:{Escape(summary)}");
if (!string.IsNullOrWhiteSpace(t.Description)) Line($"DESCRIPTION:{Escape(t.Description)}");
@@ -49,7 +57,10 @@ namespace ReminderOrganizer.Services
Line("BEGIN:VALARM");
Line("ACTION:DISPLAY");
Line($"DESCRIPTION:{Escape(t.Name)}");
Line(t.LeadDays > 0 ? $"TRIGGER:-P{t.LeadDays}D" : "TRIGGER:PT0M");
// all-day events start at midnight: remind at 09:00 (same day or lead days before)
Line(t.IsBirthday
? (t.LeadDays > 0 ? $"TRIGGER:-P{t.LeadDays - 1}DT15H" : "TRIGGER:PT9H")
: (t.LeadDays > 0 ? $"TRIGGER:-P{t.LeadDays}D" : "TRIGGER:PT0M"));
Line("END:VALARM");
Line("END:VEVENT");
}