mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.util): better relative time format
This commit is contained in:
parent
202e595e55
commit
3e30fb6c70
1 changed files with 3 additions and 0 deletions
|
|
@ -390,6 +390,9 @@ function M.reltime(time)
|
|||
return value == 1 and v[3] or v[4]:format(value)
|
||||
end
|
||||
end
|
||||
if os.date("%Y", time) == os.date("%Y") then
|
||||
return os.date("%b %d", time) ---@type string
|
||||
end
|
||||
return os.date("%b %d, %Y", time) ---@type string
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue