aboutsummaryrefslogtreecommitdiff
path: root/src/time.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/time.odin')
-rw-r--r--src/time.odin10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/time.odin b/src/time.odin
index b607e51..1f2ffbd 100644
--- a/src/time.odin
+++ b/src/time.odin
@@ -602,6 +602,16 @@ clockprintTimeblock :: proc(block: Timeblock) -> string {
}
clockprint :: proc{clockprintTimeblock, clockprintMoment}
+dayprintMoment :: proc(moment: Moment) -> string {
+ using moment
+ return fmt.tprintf("%4i-%2i-%2i", year, month, day)
+}
+dayprintTimeblock :: proc(block: Timeblock) -> string {
+ using block
+ return fmt.tprintf("%s -> %s", dayprint(start), dayprint(end))
+}
+dayprint :: proc{dayprintTimeblock, dayprintMoment}
+
popBlock :: proc(workday: ^Workday, index: int, count: int = 1) {
using workday
when ODIN_DEBUG do fmt.printf("popBlock() running to remove %i block(s) from index %i\n", count, index)