beeminder / BeeSwift

Official Beeminder for iOS app
Other
30 stars 6 forks source link

date picker wraps around to 1 for the first of the current month #496

Closed krugerk closed 6 days ago

krugerk commented 1 month ago

The Edit Datapoint screen contains a date picker. The Add Datapoint screen, the lower part of the goal screen, did not contain a date picker. Instead it contained a single digit to represent the date of the to-be-created datapoint and furthermore sent this single digit to the backend as part of urtext. The backend itself then interpreted the values sent and really had no way to accurately map the "day of the month" number to any particular year or month.

With this merge request, the Add Datapoint section has been given its own date which is then sent to the backend when adding the new datapoint. Since the app now provides all of year, month, and day, there is less ambiguity related to the daystamp for the datapoint.

Furthermore, similar to how the Android app / Beedroid handles this, the format shown varies: the (date) value shown is either a simple single number (the day) when within the same month, the month and day when no longer in the same month but still the same year, and all three components when the point is for a different calendar year.

example, stepping through dates on 2024-Oct-21:

https://github.com/user-attachments/assets/fb4f0d23-6880-4e8d-97a9-4ed38dff4185

Fixes #386