authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-23 23:12:51 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-23 23:12:51 -07:00
log94b512933f9e9a665ef30f466bb71a3774840239
tree920257fc223bf511216d1cb5d0525b6dae3a762a
parent437f7de0f51104f2e16e24cdb320db75bb2fbf74

fix weekday progression. was only being updated at the end


1 files changed, 2 insertions(+), 0 deletions(-)

time.zig+2
......@@ -100,6 +100,7 @@ pub const DateTime = struct {
100100 if (input >= year_len) {
101101 result.years += 1;
102102 input -= year_len;
103 result.incrementWeekday(year_len);
103104 continue;
104105 }
105106 break;
......@@ -109,6 +110,7 @@ pub const DateTime = struct {
109110 if (input >= month_len) {
110111 result.months += 1;
111112 input -= month_len;
113 result.incrementWeekday(month_len);
112114
113115 if (result.months == 12) {
114116 result.years += 1;