diff options
author | Ben S <ogham@bsago.me> | 2015-02-09 18:14:05 +0000 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-02-09 18:14:05 +0000 |
commit | 8b520edf3d667b8f37278be7b3a313b2972db7a8 (patch) | |
tree | e2ff5e93ce162562f0106f28b0661f617cbfc400 /src/column.rs | |
parent | bc7492e7e6ee993b70e81c51bc341d15f70dcf12 (diff) |
Only display the year if it's last year
Otherwise, just display the hour and minute.
Diffstat (limited to 'src/column.rs')
-rw-r--r-- | src/column.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/column.rs b/src/column.rs index 8b46d9c..11aae59 100644 --- a/src/column.rs +++ b/src/column.rs @@ -8,7 +8,7 @@ use options::{SizeFormat, TimeType}; pub enum Column { Permissions, FileSize(SizeFormat), - Timestamp(TimeType), + Timestamp(TimeType, i64), Blocks, User, Group, @@ -43,15 +43,15 @@ impl Column { /// to have a header row printed. pub fn header(&self) -> &'static str { match *self { - Column::Permissions => "Permissions", - Column::FileSize(_) => "Size", - Column::Timestamp(t) => t.header(), - Column::Blocks => "Blocks", - Column::User => "User", - Column::Group => "Group", - Column::HardLinks => "Links", - Column::Inode => "inode", - Column::GitStatus => "Git", + Column::Permissions => "Permissions", + Column::FileSize(_) => "Size", + Column::Timestamp(t, _) => t.header(), + Column::Blocks => "Blocks", + Column::User => "User", + Column::Group => "Group", + Column::HardLinks => "Links", + Column::Inode => "inode", + Column::GitStatus => "Git", } } } |