Commit dddde17
authored
using
``Daystamp`` contains the logic for calculating the date (all of year,
month, and day) that should be reported as the daystamp of a newly
created datapoint, including accounting for the goal's deadline.
This merge request uses Daystamp and this feature of it to replace the
three instances of other areas in the app tackling this same
calculation: in Today View extension, in Goal / add datapoint, and in
Timer.
Furthermore, three places with their own implementations all suffered
the same logic error of not accounting for certain deadlines correctly -
in particular deadlines just after midnight (midnight until 1 in the
morning):
```swift
if self.goal.deadline > 0 && currentHour! < 6 && currentHour! < self.goal.deadline/3600 {
self.dateStepper.value = -1
}
```
If there was not a whole hour of difference, then the deadline was
effectively ignored.
Fixes #17
Fixes #228
--
There have been many reports of the app not handling deadlines well or
properly. Commit 5f3278c introduces
logic for handling the deadline in the Goal/add and Timer screens.
Other, possibly related issues: #17, #35, #228, #450Daystamp when considering deadline (#510)1 parent 4e5c5eb commit dddde17
File tree
4 files changed
+43
-83
lines changed- BeeKit
- BeeSwiftToday
- BeeSwift
4 files changed
+43
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
147 | 156 | | |
148 | 157 | | |
149 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
150 | 175 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 212 | + | |
236 | 213 | | |
237 | 214 | | |
238 | 215 | | |
| |||
513 | 490 | | |
514 | 491 | | |
515 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
516 | 502 | | |
517 | 503 | | |
518 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 146 | + | |
173 | 147 | | |
174 | 148 | | |
175 | 149 | | |
| |||
182 | 156 | | |
183 | 157 | | |
184 | 158 | | |
185 | | - | |
| 159 | + | |
186 | 160 | | |
187 | 161 | | |
188 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
156 | 131 | | |
157 | | - | |
| 132 | + | |
158 | 133 | | |
159 | 134 | | |
160 | 135 | | |
| |||
0 commit comments