[habit][library] Habit: the local day with rollover, days read, the forgiving weekly streak, the reminder schedule, medals as a pure function of the log; sessions carry their UTC offset

This commit is contained in:
2026-11-17 11:58:09 +01:00
parent b9462af39f
commit 9a2ba174ce
15 changed files with 822 additions and 9 deletions
+2
View File
@@ -32,6 +32,7 @@ fn yearly_and_all_time() {
e(Op::ReadStart { book: "a".into(), read: "r4".into(), date: Some("2026-01-01".into()) }),
e(Op::ReadEnd { read: "r4".into(), date: Some("2026-01-20".into()), outcome: Outcome::Read }),
e(Op::Session {
offset_min: None,
id: "s1".into(),
book: "a".into(),
start: 0,
@@ -41,6 +42,7 @@ fn yearly_and_all_time() {
date: "2025-01-10".into(),
}),
e(Op::Session {
offset_min: None,
id: "s2".into(),
book: "b".into(),
start: 0,