This commit is contained in:
Rikuoh Tsujitani 2024-05-14 23:23:13 +09:00
parent 07c9730ed2
commit 5f65b19cc6
Signed by: riq0h
GPG key ID: 010F09DEA298C717

6
ls.rb
View file

@ -85,11 +85,7 @@ def file_size(filenames)
end end
def timestamp(file_stat) def timestamp(file_stat)
if Time.now - file_stat.mtime >= (60 * 60 * 24 * (365 / 2.0)) || (Time.now - file_stat.mtime).negative? print file_stat.mtime.strftime('%_m %_d %H:%M')
print " #{file_stat.mtime.strftime('%_m %_d %Y')}"
else
print " #{file_stat.mtime.strftime('%_m %_d %H:%M')}"
end
end end
def slice_filenames(listed_filenames) def slice_filenames(listed_filenames)