diff options
author | joelostblom <joel.ostblom@gmail.com> | 2018-12-25 22:39:24 +0100 |
---|---|---|
committer | joelostblom <joel.ostblom@gmail.com> | 2018-12-25 22:39:24 +0100 |
commit | 9bd860528f2453b56ca4c4f23fba2b11e026813c (patch) | |
tree | 720d26182ed74240b3fca4a306af0e5b05a57f60 /ranger | |
parent | d31046771bafa15b5492078e60caac0a93db99cb (diff) | |
download | ranger-9bd860528f2453b56ca4c4f23fba2b11e026813c.tar.gz |
Choose more recognizable numbers
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/linemode.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ranger/core/linemode.py b/ranger/core/linemode.py index d95739e1..c2e11d1a 100644 --- a/ranger/core/linemode.py +++ b/ranger/core/linemode.py @@ -144,9 +144,9 @@ class HumanMtimeLinemode(LinemodeBase): return '?' file_date = datetime.fromtimestamp(fobj.stat.st_mtime) time_diff = datetime.now().date() - file_date.date() - if time_diff.days > 364: + if time_diff.days >= 365: return file_date.strftime("%-d %b %Y") - if time_diff.days > 6: + if time_diff.days >= 7: return file_date.strftime("%-d %b") if time_diff.days >= 1: return file_date.strftime("%a") @@ -165,9 +165,9 @@ class SizeHumanMtimeLinemode(LinemodeBase): size = human_readable(fobj.size) file_date = datetime.fromtimestamp(fobj.stat.st_mtime) time_diff = datetime.now().date() - file_date.date() - if time_diff.days > 364: + if time_diff.days >= 365: return "%s %11s" % (size, file_date.strftime("%-d %b %Y")) - if time_diff.days > 6: + if time_diff.days >= 7: return "%s %11s" % (size, file_date.strftime("%-d %b")) if time_diff.days >= 1: return "%s %11s" % (size, file_date.strftime("%a")) |