obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.51k stars 231 forks source link

refactor: Introduce a TaskDate class #1104

Open claremacrae opened 2 years ago

claremacrae commented 2 years ago

This was a suggestion from @sytone:

how about making a TaskDate class and have that deal with all the date management across the plugin.

_Originally posted by @sytone in https://github.com/obsidian-tasks-group/obsidian-tasks/pull/696#discussion_r884173142_

There is so much repetition in the code and tests around parsing and formatting of dates: it would be really, really good to hide all that away in a class and simplify the code.

claremacrae commented 4 weeks ago

I'm leaving this open until Task uses TasksDate for all date and time operations...

This is needed to: