Modul:DateUtils/testcases
Aspect
Eroare Lua: expandTemplate: template "module test cases notice" does not exist.
local p = require('Modul:UnitTests')
local DateUtils = require('Modul:DateUtils')
function p.testFormatDate()
local dateWithDayPrecision = {precision=11,month=11,year=2012,day=30}
p:equals('formatDate(30 noiembrie 2012)', DateUtils.formatDate(dateWithMonthPrecision), '30 noiembrie 2012')
local dateWithMonthPrecision = {precision=10,month=11,year=2012,day=0}
p:equals('formatDate(noiembrie 2012)', DateUtils.formatDate(dateWithMonthPrecision), 'noiembrie 2012')
local dateWithYearPrecision = {precision=9,month=0,year=2012,day=0}
p:equals('formatDate(2012)', DateUtils.formatDate(dateWithMonthPrecision), '2012')
end
return p