From 13a7a72279674c2a2180daa67fede63660218fd9 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 12 Sep 2023 23:31:49 +0200 Subject: this_year now returns a number --- activity/dates.lua | 2 +- spec/dates_spec.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activity/dates.lua b/activity/dates.lua index c863cdb..038ea6b 100644 --- a/activity/dates.lua +++ b/activity/dates.lua @@ -10,7 +10,7 @@ end function dates.this_year () - return os.date"%Y" + return tonumber(os.date"%Y") end diff --git a/spec/dates_spec.lua b/spec/dates_spec.lua index 6239fdc..1c5382e 100644 --- a/spec/dates_spec.lua +++ b/spec/dates_spec.lua @@ -21,7 +21,7 @@ describe("Days in a year", function() end) describe("This year is", function() - local this_year = os.date "%Y" -- Quite useless test + local this_year = tonumber(os.date"%Y") -- Quite useless test it(tostring(this_year), function() assert.are.equal(this_year, dates.this_year()) -- cgit v1.1