diff options
author | San Jacobs | 2024-01-02 11:47:26 +0100 |
---|---|---|
committer | San Jacobs | 2024-01-02 11:47:26 +0100 |
commit | 0848a29feb14ae01d8cad90db61987fcf9609acd (patch) | |
tree | c4457602b70abc2b87998ef1b2b9f7ac56ccea07 | |
parent | 99c9a335ca8df3b60389d4a2cd5036db44a83c9b (diff) | |
download | satscalc-0848a29feb14ae01d8cad90db61987fcf9609acd.tar.gz satscalc-0848a29feb14ae01d8cad90db61987fcf9609acd.tar.bz2 satscalc-0848a29feb14ae01d8cad90db61987fcf9609acd.zip |
Fixed the 4-hour minimum bug referenced in 5f685eaabf4
-rw-r--r-- | src/time.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time.odin b/src/time.odin index 7b8127d..ac1626e 100644 --- a/src/time.odin +++ b/src/time.odin @@ -136,8 +136,8 @@ new_workday :: proc(previous_wrap : Moment, j: int = 0 for each_point in splitpoints_sorted { // If each splitpoint moment is within the workday, and is not equal to the start of the current block - if sortable(each_point) > sortable(call) && - sortable(each_point) < sortable(wrap) && + if sortable(each_point) > sortable(call) && // vvvvvvvvvvvvvvvvvvvvvvvv this complication is here to cover + sortable(each_point) < sortable(time_max(wrap, add(call, {0, 4, 0}))) && // for the 4-hour minimum day. each_point != working_block.start { blocks[j], working_block = timesplit(working_block, each_point) |