From 4f68c2d3922d1491fab3517b5d001a758cecee6d Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sun, 18 Jul 2021 10:00:06 +0200 Subject: [PATCH] chore(*) replace tabs with spaces --- samples/mkcalendar.lua | 62 +++++++++++++++++++++--------------------- samples/mkisocal.lua | 28 +++++++++---------- spec/date_spec.lua | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/samples/mkcalendar.lua b/samples/mkcalendar.lua index 32c7129..eeae938 100644 --- a/samples/mkcalendar.lua +++ b/samples/mkcalendar.lua @@ -2,36 +2,36 @@ This script makes an html calendar Syntax: mkcalendar.lua year1 year2 year3 .. yearn > file arg: - year1 .. yearn - the year(s) of the calendar to generate - file - the name of the file to write the generated text calendar + year1 .. yearn - the year(s) of the calendar to generate + file - the name of the file to write the generated text calendar --]]--------------------- local date = require"date" function makemonth(y,m) - local t = {} - local d = date(y,m,1) - t.name = d:fmt("%B") - t.year = y - -- get back to the nearest sunday - d:adddays(-(d:getweekday()-1)) - repeat - local tt = {} - table.insert(t,tt) - repeat -- insert the week days - table.insert(tt, d:getday()) - until d:adddays(1):getweekday() == 1 - until d:getmonth() ~= m - return t + local t = {} + local d = date(y,m,1) + t.name = d:fmt("%B") + t.year = y + -- get back to the nearest sunday + d:adddays(-(d:getweekday()-1)) + repeat + local tt = {} + table.insert(t,tt) + repeat -- insert the week days + table.insert(tt, d:getday()) + until d:adddays(1):getweekday() == 1 + until d:getmonth() ~= m + return t end local htm_foot = '\n' local htm_head = [[ ]] @@ -40,23 +40,23 @@ local htm_monhead = '\n%s, %ssun file arg: - year1 .. yearn - the year(s) of the calendar to generate - file - the name of the file to write the generated text calendar + year1 .. yearn - the year(s) of the calendar to generate + file - the name of the file to write the generated text calendar --]]--------------------- local date = require"date" @@ -13,16 +13,16 @@ local htm_head = [[