Skip to content

Commit

Permalink
fix: "%-y" on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
monaqa committed Mar 25, 2023
1 parent e7d7931 commit ce8e858
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/dial/augend/date.lua
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ local date_elements = {
date.year = 2000 + tonumber(text)
return date
end,
format = function(time)
local year = os.date("*t", time).year --[[ @as integer ]]
return tostring(year % 100)
end,
},
["-m"] = {
kind = "month",
Expand Down Expand Up @@ -753,7 +757,7 @@ M.alias["%H:%M:%S"] = M.new {

M.alias["%H:%M"] = M.new {
pattern = "%H:%M",
default_kind = "sec",
default_kind = "min",
only_valid = true,
}

Expand Down

0 comments on commit ce8e858

Please sign in to comment.