Skip to content

Instantly share code, notes, and snippets.

@mgmeyers
Last active May 11, 2023 15:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgmeyers/398d8efd30a706f7fd15962abb3837af to your computer and use it in GitHub Desktop.
Save mgmeyers/398d8efd30a706f7fd15962abb3837af to your computer and use it in GitHub Desktop.
Obsidian Plugin Task+Date Format

Obsidian Plugin Task+Date Format

The goal of this proposal is to enable compatibility between plugins that combine dates and tasks.

Currently, most plugins implement their own structured date format.

Kanban plugin: - [ ] task 1 @[[2021-11-01]] @@{8:35}
Tasks plugin: - [ ] task 1 📆2021-11-1
Reminders: - [ ] task 1 ([[2021-11-01]] 8:35)
Cardboard: - [ ] task 1 @due (2021-11-01)

The utility and user experience of these plugins could be enhanced by using a single format.

This forum thread discusses such a format, and below is a summary of what's been discussed so far.

Must haves

  • Uses dataview inline metadata format
    • key:: value
    • While dataview is to be supported, we can't expect or rely on the plugin actually being activated
    • TODO: Could a dataview user articulate the how this would be used and what value it would bring?
  • Uses daily note date format
    • Defaults to YYYY-MM-DD but can be set by user
  • Supports time
    • This may require that this format be supported by a plugin, as there is no way to define a time format at the moment
  • Supports links to daily notes
    • [[YYYY-MM-DD]]
  • Simultaneously supports non-links
    • Eg. {YYYY-MM-DD}
    • Note: date formats are arbitrary and can contain spaces if modified by the user, so wrapping the date with special characters is advised
  • Supports label to assign meaning to a date
    • For example: due, complete, etc…
    • The format itself should not define these labels, that should be left up to users and plugin developers, though suggestions can be made.
    • If the we did specify or suggest labels, they should be translated into all languages Obsidian supports and not be English-centric

Nice to haves

  • An abbreviated format when a label isn’t necessary

Other considerations

  • Is easy and performant to parse
    • Parsing will likely be done via regular expressions, so the format must be regular
      • Dates are not regular, as the daily note format can be changed by the user to literally anything
    • Parsing performance should be considered
  • Reduces potential collisions with other plugins / data formats
    • Eg. the @ symbol used in pandoc/citeproc citation keys. This doesn’t mean it shouldn’t be used here, but that potential collisions should be accounted for
  • Reduces false positives
    • A user might link to a daily note for reasons other than assigning a date to a task.
    • Eg. - [ ] Process left over TODOs from [[YYYY-MM-DD]] due:: [[YYYY-MM-DD]]
  • Allows for easy autocompletion
    • Slash commands make this almost a non-issue, though not all plugins use obsidian's editor

Current proposals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment