GNOME Bugzilla – Bug 346337
smart date formatting
Last modified: 2013-05-26 16:23:43 UTC
When you browse a directory with the GTK file opener, dates are smartly formatted. "Today", "Monday", probably "Yesterday" etc. In nautilus we just see eg 26/06/2006. I think the application would be nicer to use if we had in nautilus the same smart date formatting (more human-readable dates) than in the gtk file opener. Other information:
Created attachment 68234 [details] same folder in nautilus and in file opener The dates as shown in the file opener are much more pleasing and much more readable to human eyes.
*** Bug 564277 has been marked as a duplicate of this bug. ***
This is a great proposal. It would give Nautilus more polish and make it easier for users to understand.
I'm not sure about the date format though. It will have to be grabbed from the user's locale. The number of seconds is currently displayed which isn't worth mentioning compared to the noise it causes. We probably only need to display the year if year_modified != current_year. The date formats will have to be consistent amongst the lists as well.
Let's try to work on this for 2.32/3.0.
Marking the dependency on an API like the one proposed in bug 325064. We could always throw it somewhere in eel, but it'd be better if we could get that patch merged into glib.
Created attachment 160891 [details] [review] Use a smart date/time formatting (#346337). This is not the complete patch, which removes the locale preference altogether from Nautilus, but is a good overview for the heuristic I want to use to format the date/time. In this case, I used nl_langinfo() to fetch the default date/time format for the current locale. * in the time string, seconds are removed * in the date string, we use "Today", "Yesterday" or the name of the day of the week (according to the locale) in case the date is in the same week; otherwise we use the locale preferred representation of the date, substituting the month with its abbreviated name, the year with either the full year (including the century) or its alternative representation, according to the locale, and the day with either the number of the day in the month or its alternative representation, according to the locale.
*** Bug 504442 has been marked as a duplicate of this bug. ***
We should try to pack this for 3.2.
*** Bug 333732 has been marked as a duplicate of this bug. ***
*** Bug 664899 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 676898 ***