obsidian-tracker icon indicating copy to clipboard operation
obsidian-tracker copied to clipboard

Example sleep tracker doesn't work for sleep times before and after 00:00 (midnight)

Open ghost opened this issue 5 months ago • 1 comments

Someone else posted about this on the Obsidian forum: https://forum.obsidian.md/t/custom-hour-shift-for-sleep-tracker/45928

It's an issue I've been trying to solve but don't know how. The example sleep tracker doesn't show times before and after midnight in a sensible way, and I'm not sure how to make it do that.

Expected Behavior

Say we have two sleep times, 23:30 (11:30pm) and 00:30 (12:30am). The tracker should display those an hour apart.

Current Behavior

The tracker currently shows those two sleep times as 23 hours apart, I think because it doesn't handle the notion of two different days.

Steps to Reproduce (for bugs)

Just run the example sleep tracker with those two sleep times.

Context

Unfortunately it makes my sleep tracker not very useful, since my sleep times are sometimes before and sometimes after midnight.

ghost avatar Jan 13 '24 20:01 ghost