Leonezz / obsidian-tasks-calendar-wrapper

This plugin currently provides a timeline view to display your tasks from your obsidian valut, with customizable filters and renderring options.
MIT License
169 stars 10 forks source link

feat: add convert24HourTimePrefix option #57

Closed stelcodes closed 1 year ago

stelcodes commented 1 year ago

This commit adds a feature that alters the display/visual text of a task when it is prefixed with a timestamp in 24-hour format. It must be 5 digits in the format "09:00" or "23:45". When this setting is enabled, any 24-hour timestamp at the very beginning of a task will be visually converted into 12-hour format with an "am" or "pm" after. This allows tasks to be sortable by time (24-hour format is sortable, 12-hour format is not) while having the option to display the times in the 12-hour format if the user finds it easier to read.

stelcodes commented 1 year ago

I made this because I prefer 12 hour time format but I want my tasks to be chronologically ordered.

Just force pushed some small changes, now it's ready.

stelcodes commented 1 year ago

grim:2023-08-19T02:18:17Z

With sort by text (ascending) enabled

stelcodes commented 1 year ago

Ok now I'm actually done changing the PR until review, just wanted to make the commit message a bit better.

Leonezz commented 1 year ago

Hi @stelcodes , this is a very useful feature! thanks for the contribution! Could you please also make a pr to the documentation (the README.md) so that people would know and use this cool feature ?