[Design] Proposals: support AM/PM guessing if the user enters a time without it?

Philippe Bossut pbossut at osafoundation.org
Wed Mar 1 09:47:53 PST 2006


Bryan Stearns wrote:
> Proposal #2:
> Slightly more complicated than Proposal #1, which has weirdness if the 
> previous value was 12:00 PM (which is noon), changing it to 11:45 
> would move it to almost midnight. Instead:
> - if that time didn't previously have a value (eg, the user replaced 
> the "hh:mm AM" hint), use AM if the hour < 13, else PM.
> - Otherwise (previous time had a value!), if the previous time was 
> exactly 12:00 PM (noon), use AM. (This doesn't fix weirdness around 
> midnight, but that'd be less of an issue and harder to guess; think 
> about it.)
> - Otherwise, use the AM/PM from the previous value as is.
Another proposal based on that one:
- if the previous time had a value, use the closest time to the previous 
time: there are only 2 times possible (AM or PM) with 12 hours of 
difference between them, we compute the time difference between the 
previous time and those 2 values and choose the smallest one. That takes 
care of the noon and midnight issues. It's also the most likely scenario 
that a meeting time is moved around the previously proposed time.

- Philippe

More information about the Design mailing list