Skip to content

Text parser logic

Tijl Leenders edited this page Aug 30, 2022 · 4 revisions

This page specifies which 'tags' appear below the text.

Language Shown as 'English', etc Stored as ... When present? Always, cannot be deleted Value? Based on UI languag chosen

start Shown as 'Start date (@X)' Stored as Datetime When present?

  • Whenever a start + date is deteced
    • 'start 12/3' for 12th of March
    • 'start tomorrow' for tomorrow at start of day (midnight)
    • 'start tomorrow @15' for tomorrow at start of day (midnight)
    • 'start Tuesday' for the coming Tuesday at start of day (midnight)
    • 'start next week' for next week Monday at start of day (midnight)
    • 'start next week Tuesday' for next week Tuesday at start of day (midnight)
    • ... other cases that don't have to be implemented unless specified here Value? X = number of hours

due
Synomym: Wherever 'due' is mentioned 'by' can be substituted
Shown as 'Due date (@Y)'
Stored as Datetime
When present?

  • Whenever a due + date is detected or date without start/due before is detected
    • 'Deliver report 12/3' for 12th of March at end of day (midnight)
    • 'due 12/3' for 12th of March at end of day (midnight)
    • ('due'/'by') 'today' for due date today at end of day (midnight)
    • ('due'/'by') 'tomorrow' for for tomorrow at end of day (midnight)
    • 'due tomorrow' for tomorrow at end of day (midnight)
    • 'due tomorrow @15' for tomorrow at end of day (midnight)
    • 'due Tuesday' for the coming Tuesday at end of day (midnight)
    • 'Tuesday' for the coming Tuesday at end of day (midnight)
    • 'due next week' for next week Monday at end of day (midnight)
    • 'due next week Tuesday' for next week Tuesday at end of day (midnight)
    • 'this year' for due date on last day of the year at end of day (midnight)
    • 'this week' for due date on the Sunday at end of day (midnight)

afterTime Shown as 'After X' Stored as number When present?

  • Whenever 'after X' is detected
  • Whenever 'X-Y' is detected Value? X = time of day in hours

beforeTime Shown as 'Before Y' Stored as number When present?

  • Whenever 'before Y' is detected
  • Whenever 'X-Y' is detected Value? X = time of day in hours

repeat Shown as 'daily'/'weekly'/'monthly'/'Mondays'/'Tuesdays'/'Wednesdays'/'Thursdays'/'Fridays'/'Saturdays'/'Sundays' Stored as string When present?

  • Whenever 'daily'/'weekly'/'monthly' is detected (working from back to front picking the first one found)
  • Whenever 'every Monday/Tuesday/Wednesday/Thursday/Friday/Saturday/Sunday' is detected
  • Whenever 'Mondays'/'Tuesdays'/'Wednesdays'/'Thursdays'/'Fridays'/'Saturdays'/'Sundays' is detected => then stored as 'every Monday/Tuesday/etc' Value? string

deadline Old tag - replaced by due

Clone this wiki locally