Deze module is nog in ontwikkeling (versie 0.0) en wordt getest.
De Module:Layout is bedoeld om snel, consistent en uitgebreid een pagina op te maken.
Er is een op de module afgestemde handleiding over deze onderwijswiki beschikbaar.
localtest={}localCFG=require("Module:Layout/Production/Configuration");localtimestamp=CFG.INCLUDE("production","timestamp");localunittest=CFG.INCLUDE("production","unittest");test=unittest:new();functiontest.main(frame)returntest.run(frame);endfunctiontest:test_valid_timestamp()-- Test leap yearsself:assertTrue(timestamp.valid(29,2,2000));-- Leap year, divisible by 4, 100, and 400self:assertTrue(timestamp.valid(29,2,2020));-- Leap year, divisible by 4, not 100self:assertFalse(timestamp.valid(29,2,1900));-- Not a leap year, divisible by 4 and 100, but not 400self:assertFalse(timestamp.valid(29,2,2021));-- Not a leap year, not divisible by 4-- Test valid days for each monthlocaldaysInMonth={31,28,31,30,31,30,31,31,30,31,30,31};formonth,daysinipairs(daysInMonth)doself:assertTrue(timestamp.valid(days,month,2021));end-- Test invalid days for each monthformonth,daysinipairs(daysInMonth)doself:assertFalse(timestamp.valid(days+1,month,2021));endendreturntest;