[
{
"name": "the README example: every kind of token in one line",
"args": [
"Pay rent tomorrow !high #home every month",
"2026-09-28"
],
"expect": {
"title": "Pay rent",
"notes": null,
"priority": "high",
"due": "2026-09-29",
"tags": [
"home"
],
"recurrence": {
"frequency": "monthly",
"interval": 1,
"anchor": "2026-09-29"
}
}
},
{
"name": "plain words are all title",
"args": [
"Buy milk",
"2026-09-28"
],
"expect": {
"title": "Buy milk",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "the title is trimmed and inner runs of whitespace collapse",
"args": [
" Call \t Bob\n",
"2026-09-28"
],
"expect": {
"title": "Call Bob",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "a date phrase anywhere in the line",
"args": [
"Team sync friday",
"2026-09-28"
],
"expect": {
"title": "Team sync",
"notes": null,
"priority": "none",
"due": "2026-10-02",
"tags": [],
"recurrence": null
}
},
{
"name": "a weekday name on that same weekday is a week away",
"args": [
"Team sync monday",
"2026-09-28"
],
"expect": {
"title": "Team sync",
"notes": null,
"priority": "none",
"due": "2026-10-05",
"tags": [],
"recurrence": null
}
},
{
"name": "in 1 month from 31 January is 28 February",
"args": [
"Submit report in 1 month",
"2026-01-31"
],
"expect": {
"title": "Submit report",
"notes": null,
"priority": "none",
"due": "2026-02-28",
"tags": [],
"recurrence": null
}
},
{
"name": "an ISO date of 29 February in a leap year",
"args": [
"Party 2028-02-29 #family",
"2028-01-10"
],
"expect": {
"title": "Party",
"notes": null,
"priority": "none",
"due": "2028-02-29",
"tags": [
"family"
],
"recurrence": null
}
},
{
"name": "30 February is not a date and stays in the title",
"args": [
"Dentist 2026-02-30",
"2026-09-28"
],
"expect": {
"title": "Dentist 2026-02-30",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "a four-word phrase with due in front",
"args": [
"Pay due in 3 days",
"2026-09-28"
],
"expect": {
"title": "Pay",
"notes": null,
"priority": "none",
"due": "2026-10-01",
"tags": [],
"recurrence": null
}
},
{
"name": "on before an ISO date, with priority and tags",
"args": [
"Meeting on 2026-10-01 !m #work #Work-Stuff",
"2026-09-28"
],
"expect": {
"title": "Meeting",
"notes": null,
"priority": "medium",
"due": "2026-10-01",
"tags": [
"work",
"work-stuff"
],
"recurrence": null
}
},
{
"name": "a two-word phrase counts on its own",
"args": [
"Plan next week",
"2026-09-28"
],
"expect": {
"title": "Plan",
"notes": null,
"priority": "none",
"due": "2026-10-05",
"tags": [],
"recurrence": null
}
},
{
"name": "next week's is not next week",
"args": [
"Plan next week's menu",
"2026-09-28"
],
"expect": {
"title": "Plan next week's menu",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "a bare 3-letter weekday stays in the title",
"args": [
"Read the sun",
"2026-09-28"
],
"expect": {
"title": "Read the sun",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "the same abbreviation after on is a date",
"args": [
"Picnic on sun",
"2026-09-28"
],
"expect": {
"title": "Picnic",
"notes": null,
"priority": "none",
"due": "2026-10-04",
"tags": [],
"recurrence": null
}
},
{
"name": "a bare weekend stays in the title",
"args": [
"Plan weekend trip",
"2026-09-28"
],
"expect": {
"title": "Plan weekend trip",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "an unknown unit stays in the title",
"args": [
"Travel in 3 lightyears",
"2026-09-28"
],
"expect": {
"title": "Travel in 3 lightyears",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "only the first date phrase counts; later ones stay in the title",
"args": [
"Pay tomorrow and friday",
"2026-09-28"
],
"expect": {
"title": "Pay and friday",
"notes": null,
"priority": "none",
"due": "2026-09-29",
"tags": [],
"recurrence": null
}
},
{
"name": "a lone #, a lone ! and every on its own stay in the title",
"args": [
"Tidy up # ! every",
"2026-09-28"
],
"expect": {
"title": "Tidy up # ! every",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "unicode title text is kept as typed",
"args": [
"Café 日本 🎉 friday",
"2026-09-28"
],
"expect": {
"title": "Café 日本 🎉",
"notes": null,
"priority": "none",
"due": "2026-10-02",
"tags": [],
"recurrence": null
}
},
{
"name": "a tag that normalises to nothing stays in the title",
"args": [
"#日本 Visit",
"2026-09-28"
],
"expect": {
"title": "#日本 Visit",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "tags are normalised and deduplicated in order",
"args": [
"#Home #home #Home-Office Clean",
"2026-09-28"
],
"expect": {
"title": "Clean",
"notes": null,
"priority": "none",
"due": null,
"tags": [
"home",
"home-office"
],
"recurrence": null
}
},
{
"name": "only tokens: the title comes out empty",
"args": [
"tomorrow #x !h",
"2026-09-28"
],
"expect": {
"title": "",
"notes": null,
"priority": "high",
"due": "2026-09-29",
"tags": [
"x"
],
"recurrence": null
}
},
{
"name": "!!! is high",
"args": [
"Fix bug !!!",
"2026-09-28"
],
"expect": {
"title": "Fix bug",
"notes": null,
"priority": "high",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "!2 is medium",
"args": [
"Email accountant !2",
"2026-09-28"
],
"expect": {
"title": "Email accountant",
"notes": null,
"priority": "medium",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "!L is low, in any case",
"args": [
"Call !L plumber",
"2026-09-28"
],
"expect": {
"title": "Call plumber",
"notes": null,
"priority": "low",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "!none is an explicit none",
"args": [
"Nap !NONE",
"2026-09-28"
],
"expect": {
"title": "Nap",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "an unknown !word stays in the title",
"args": [
"Deploy !urgent",
"2026-09-28"
],
"expect": {
"title": "Deploy !urgent",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "the first priority wins; the second stays in the title",
"args": [
"!low !high Fix bug",
"2026-09-28"
],
"expect": {
"title": "!high Fix bug",
"notes": null,
"priority": "low",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "every month with no date is due today",
"args": [
"Invoice clients every month",
"2026-09-28"
],
"expect": {
"title": "Invoice clients",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "monthly",
"interval": 1,
"anchor": "2026-09-28"
}
}
},
{
"name": "every other day is daily with interval 2",
"args": [
"Water plants every other day",
"2026-09-28"
],
"expect": {
"title": "Water plants",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "daily",
"interval": 2,
"anchor": "2026-09-28"
}
}
},
{
"name": "every 3 weeks",
"args": [
"Backup every 3 weeks",
"2026-09-28"
],
"expect": {
"title": "Backup",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "weekly",
"interval": 3,
"anchor": "2026-09-28"
}
}
},
{
"name": "every 12 months, and a title word that looks like a repeat",
"args": [
"Yearly review every 12 months",
"2026-09-28"
],
"expect": {
"title": "Yearly review",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "monthly",
"interval": 12,
"anchor": "2026-09-28"
}
}
},
{
"name": "weekly without every is a title word",
"args": [
"Write weekly report",
"2026-09-28"
],
"expect": {
"title": "Write weekly report",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "every thursday on a Monday: due this Thursday",
"args": [
"Bins every thursday",
"2026-09-28"
],
"expect": {
"title": "Bins",
"notes": null,
"priority": "none",
"due": "2026-10-01",
"tags": [],
"recurrence": {
"frequency": "weekly",
"interval": 1,
"anchor": "2026-10-01"
}
}
},
{
"name": "every monday on a Monday: due next Monday",
"args": [
"Gym every monday",
"2026-09-28"
],
"expect": {
"title": "Gym",
"notes": null,
"priority": "none",
"due": "2026-10-05",
"tags": [],
"recurrence": {
"frequency": "weekly",
"interval": 1,
"anchor": "2026-10-05"
}
}
},
{
"name": "a date phrase beats every <weekday> for the due date and anchor",
"args": [
"Report every friday due 2026-10-16",
"2026-09-28"
],
"expect": {
"title": "Report",
"notes": null,
"priority": "none",
"due": "2026-10-16",
"tags": [],
"recurrence": {
"frequency": "weekly",
"interval": 1,
"anchor": "2026-10-16"
}
}
},
{
"name": "every weekday on a Monday is due today",
"args": [
"Stand-up EVERY Weekday",
"2026-09-28"
],
"expect": {
"title": "Stand-up",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "weekdays",
"interval": 1,
"anchor": "2026-09-28"
}
}
},
{
"name": "every weekday on a Saturday is due Monday",
"args": [
"Stand-up every weekday",
"2026-10-03"
],
"expect": {
"title": "Stand-up",
"notes": null,
"priority": "none",
"due": "2026-10-05",
"tags": [],
"recurrence": {
"frequency": "weekdays",
"interval": 1,
"anchor": "2026-10-05"
}
}
},
{
"name": "every weekday on a Sunday is due Monday",
"args": [
"Stand-up every weekday",
"2026-10-04"
],
"expect": {
"title": "Stand-up",
"notes": null,
"priority": "none",
"due": "2026-10-05",
"tags": [],
"recurrence": {
"frequency": "weekdays",
"interval": 1,
"anchor": "2026-10-05"
}
}
},
{
"name": "a repeat with a later date phrase anchors on that date",
"args": [
"Stretch every day in 2 days",
"2026-09-28"
],
"expect": {
"title": "Stretch",
"notes": null,
"priority": "none",
"due": "2026-09-30",
"tags": [],
"recurrence": {
"frequency": "daily",
"interval": 1,
"anchor": "2026-09-30"
}
}
},
{
"name": "the first repeat wins; the second stays in the title",
"args": [
"Renew every year every month",
"2026-09-28"
],
"expect": {
"title": "Renew every month",
"notes": null,
"priority": "none",
"due": "2026-09-28",
"tags": [],
"recurrence": {
"frequency": "yearly",
"interval": 1,
"anchor": "2026-09-28"
}
}
},
{
"name": "every 1000 days is too many: all title",
"args": [
"Ship every 1000 days",
"2026-09-28"
],
"expect": {
"title": "Ship every 1000 days",
"notes": null,
"priority": "none",
"due": null,
"tags": [],
"recurrence": null
}
},
{
"name": "today in day/month/year order is refused",
"args": [
"Buy milk",
"28/09/2026"
],
"expectError": "is not an ISO date"
},
{
"name": "today that never existed is refused",
"args": [
"Buy milk tomorrow",
"2026-13-01"
],
"expectError": "is not a real calendar date"
}
]