summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private/caja-file.c')
-rw-r--r--libcaja-private/caja-file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 97cbb9ec..6d07b24a 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -4883,12 +4883,12 @@ caja_file_fit_date_as_string (CajaFile *file,
* internationalization's sake.
*/
- if (file_date_age < G_TIME_SPAN_DAY) {
- formats = TODAY_TIME_FORMATS;
- } else if (file_date_age < 2 * G_TIME_SPAN_DAY) {
+ if (file_date_age <= 0 || file_date_age > 2 * G_TIME_SPAN_DAY) {
+ formats = CURRENT_WEEK_TIME_FORMATS;
+ } else if (file_date_age > G_TIME_SPAN_DAY) {
formats = YESTERDAY_TIME_FORMATS;
} else {
- formats = CURRENT_WEEK_TIME_FORMATS;
+ formats = TODAY_TIME_FORMATS;
}
/* Find the date format that just fits the required width. Instead of measuring