Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement relative date formatter for hourly choice sets #23

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

FrankElias77
Copy link
Contributor

Fixes #22

@FrankElias77 FrankElias77 marked this pull request as ready for review July 9, 2021 19:50
Copy link
Contributor

@joeljfischer joeljfischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After seeing it, I don't think that this change looks right. There are a number of issues:

(1) When going to hourly list, it starts from 5 hours ago, which it shouldn't.
(2) It's harder to understand what time things are happening.

To fix this:
(1) It definitely needs to start at the next hour, not 5 hours in the past. This is weird because I don't actually think the data does start back then. I think it's an implementation bug.
(2) The relative formatting should only happen for the first or first and second choices.
(3) The hourly formatting would need to apply with "tomorrow" information.
(4) It's probably better to go to every 2 hours instead of every hour.
(5) This should apply to date formatting too, for the first 2 (today, tomorrow) but not the ones after that.

This is too much work for something that doesn't really matter, so I think it's probably better to drop this PR for now.

Comment on lines +257 to +258
NSRelativeDateTimeFormatter *hourlyDateFormatShow = [[NSRelativeDateTimeFormatter alloc] init];
[hourlyDateFormatShow setUnitsStyle:NSRelativeDateTimeFormatterUnitsStyleShort];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of the warnings by moving this to iOS 13.0+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants