Skip to content

Commit

Permalink
docs: use more robust way to get the modified time
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Sep 6, 2024
1 parent 2be880d commit 065cbba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/configuration/yazi.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ linemode = "size_and_mtime"
-- ~/.config/yazi/init.lua
function Linemode:size_and_mtime()
local year = os.date("%Y")
local time = (self._file.cha.modified or 0) // 1
local time = math.floor(self._file.cha.modified or 0)

if time > 0 and os.date("%Y", time) == year then
time = os.date("%b %d %H:%M", time)
Expand Down

0 comments on commit 065cbba

Please sign in to comment.