Skip to content

docs(#161): fix the template_todo_alarm examples - #183

Open
VanshajPoonia wants to merge 1 commit into
joplin:masterfrom
VanshajPoonia:docs/161-todo-alarm-example
Open

VanshajPoonia wants to merge 1 commit into
joplin:masterfrom
VanshajPoonia:docs/161-todo-alarm-example

Conversation

@VanshajPoonia

@VanshajPoonia VanshajPoonia commented Oct 12, 2026 •

Copy link
Copy Markdown

Fixes #161

What

  • Drop format="YYYY-MM-DD HH:mm" from the two template_todo_alarm examples.
  • Use single quotes for set_time in the usage example.
  • Correct the note that said template_todo_alarm expects "YYYY-MM-DD HH:mm".

Why

template_todo_alarm is parsed strictly with the user's Joplin date and time format (getNoteMetadata passes getDateTimeFormat() to formatLocalToJoplinCompatibleUnixTime). A hardcoded YYYY-MM-DD HH:mm therefore fails for anyone with a different format, for example "Was not able to parse 2021-08-15 09:00 according to format DD/MM/YYYY HH:mm". The datetime helper already outputs the right format by default.

The usage example also ran into #177: double quotes inside a helper argument stop the value from being auto-quoted, so the frontmatter failed to parse even with a YYYY-MM-DD date format. Single quotes avoid that on the released version. Once #177 is fixed, either style works.

Testing

Parsed both examples directly from the README with the date format set to DD/MM/YYYY and to YYYY-MM-DD. On master the old examples fail with both formats. The new ones pass with both, with and without the #177 fix.

Also checked in a Joplin desktop dev build from the current dev branch: the corrected usage example creates the to-do with its alarm three days ahead at 09:00, on master and with the #177 fix. The old example fails on master because of #177, and with the #177 fix it fails with Was not able to parse 2026-10-15 09:00 according to format DD/MM/YYYY HH:mm.

AI Assistance Disclosure

I used an AI coding assistant to investigate the issue, write the change, and draft this description. The examples were checked locally and in a Joplin desktop dev build.

template_todo_alarm is parsed with the user's Joplin date and time
format, so the examples passing format="YYYY-MM-DD HH:mm" failed for
anyone using a different format. The usage example also put double
quotes inside a helper argument, which breaks frontmatter parsing on
the released version (joplin#177).

Drop the custom format, use single quotes for set_time, and correct
the note that said the variable expects "YYYY-MM-DD HH:mm".
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.

readme: template_todo_alarm example is broken

1 participant