fix(picker.util): better relative time format

This commit is contained in:
Folke Lemaitre 2025-10-29 07:43:48 +01:00
parent 202e595e55
commit 3e30fb6c70
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -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