From 2e3a7e10756954dc5a99d617a1c0eef327d3adbb Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Sun, 15 Oct 2023 14:37:29 +0200 Subject: Normalized timelines and editor for spacing and sizing --- src/time.odin | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/time.odin') 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) -- cgit v1.2.1