Skip to content

fix(calendar-links): put tasks with only a due date on their due date - #2702

Merged
callumalpass merged 1 commit into
callumalpass:mainfrom
jayhemnani9910:fix/calendar-links-due-only
Nov 25, 2026
Merged

callumalpass merged 1 commit into
callumalpass:mainfrom
jayhemnani9910:fix/calendar-links-due-only

Conversation

@jayhemnani9910

Copy link
Copy Markdown
Contributor

Follow-up to #2540, which fixed the .ics paths and left the link builders alone. "Add to calendar" > Google / Outlook / Yahoo still uses the old range, so a task with only a due date has no start:

due: 2026-11-20 (no scheduled)
google   no dates param (Google opens the event on today)
outlook  enddt=2026-11-20T05:00:00.000Z, no startdt
yahoo    et=20261120T000000, no st

A date-only scheduled day is also sent as a timed 00:00-01:00 event instead of an all-day one.

The three builders now take their dates from getICSDateProperties, the rules the .ics export uses since #2540: all-day for a date-only value (Google YYYYMMDD/YYYYMMDD, Outlook allday=true, Yahoo dur=allday), and one hour from the due time for a timed due. Links for tasks with a scheduled time are unchanged. getYahooDateFormat had no other caller and is removed.

Tested: new cases in calendar-export-due-only.test.ts fail without the change. Comparing the generated links on main and on this branch with TZ=America/New_York: tasks with a scheduled time give the same params, due-only tasks now land on the due date. A full jest run gives the same single failing test as main (mdbaseSafeWrites), with a few suites that fail from run to run in both; those pass on their own.

The Google, Outlook and Yahoo links still used the old range: a task with
only a due date had no start (Google dropped the dates, Outlook and Yahoo
got only an end), and date-only days became a 00:00-01:00 event. Build the
link dates from the same rules as the ICS export: all-day for date-only
values, one hour from the due time for a timed due.
@callumalpass
callumalpass merged commit 8b58f86 into callumalpass:main Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants