Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Xoristzatziki/testparams
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
_calendar ={} --αρχή μεταβλητής justanenter justanenter = [=[ ]=] --τέλος μεταβλητής justanenter mhnas = { {['name'] = 'Ιανουάριος', ['gen'] = 'Ιανουαρίου'}, {['name'] = 'Φεβρουάριος', ['gen'] = 'Φεβρουαρίου'}, {['name'] = 'Μάρτιος', ['gen'] = 'Μαρτίου'}, {['name'] = 'Απρίλιος', ['gen'] = 'Απριλίου'}, {['name'] = 'Μάιος', ['gen'] = 'Μαΐου'}, {['name'] = 'Ιούνιος', ['gen'] = 'Ιουνίου'}, {['name'] = 'Ιούλιος', ['gen'] = 'Ιουλίου'}, {['name'] = 'Αύγουστος', ['gen'] = 'Αυγούστου'}, {['name'] = 'Σεπτέμβριος', ['gen'] = 'Σεπτεμβρίου'}, {['name'] = 'Οκτώβριος', ['gen'] = 'Οκτωβρίου'}, {['name'] = 'Νοέμβριος', ['gen'] = 'Νοεμβρίου'}, {['name'] = 'Δεκέμβριος', ['gen'] = 'Δεκεμβρίου'}, } fulltableforcal1 = function (args) local currentdays = {} local tmpnum = 0 local monthon = mhnas[tonumber(args['Μήνας'])].name local monthg = mhnas[tonumber(args['Μήνας'])].gen local firstday = tonumber(args['day1']) for xcounter = 1,7 do if firstday > xcounter then currentdays[xcounter] = '|colspan="1"| ' else tmpnum = (xcounter - firstday + 1) currentdays[xcounter] = '| [[' .. tmpnum .. ' ' .. monthg .. '|' .. tmpnum ..']]' end end for xcounter = 8,28 do tmpnum = (xcounter - firstday + 1) currentdays[xcounter] = '| [[' .. tmpnum .. ' ' .. monthg .. '|' .. tmpnum ..']]' end for xcounter = 29,35 do if args['daycount'] + firstday > xcounter then tmpnum = (xcounter - firstday + 1) currentdays[xcounter] = '| [[' .. tmpnum .. ' ' .. monthg .. '|' .. tmpnum ..']]' else currentdays[xcounter] = '|colspan="1"| ' end end newtable = [=[{| class="toccolours" style="float:]=] .. args['float'] .. [=[; margin-left: 1em; text-align:center;" |- style="background:]=] .. args['color'] .. [=[;" |colspan="7"|'''[[]=] .. monthon .. [=[]]''' |- style="background:]=] .. args['color2'] .. [=[;" |width="14%"| Κυρ. |width="14%"| Δευτ. |width="14%"| Τρ. |width="14%"| Τετ. |width="14%"| Πεμ. |width="14%"| Παρ. |width="14%"| Σαβ. |-]=] local daytoshow = 0 for ycounter = 1,5 do for xcounter = 1,7 do --if ycounter < 2 then --daytoshow = xcounter --else daytoshow = (((ycounter - 1 ) * 7) + xcounter) --mw.log(type(daytoshow)) newtable = newtable .. justanenter .. currentdays[daytoshow] .. justanenter end newtable = newtable .. justanenter .. '|-' end newtable = newtable .. [=[ |colspan="7"| |- style="background:]=] .. args['color2'] .. [=[" |colspan="7"| ]=] .. args['yearlink'] .. justanenter .. [=[ |}]=] return newtable end function _calendar.Cal1(frame) local args = frame.args return frame:preprocess(fulltableforcal1(args)) end function _calendar.test() local args = {} args['color2'] = '#ccccff' -- args['Μήνας'] = 'Ιούλιος' args['Μήνας'] = 6 -- args['Γεν-Μήνα'] = 'Ιουλίου' args['color'] = '#ccccff' args['color2'] = 'ccccff' args['1day'] = 2 args['float'] = 'float' args['yearlink'] = '[[2013]]' args['daycount'] = 30 -- args[1] = 'arg1' -- args['1a'] = 'arg1a' -- args[2] = 'arg2' -- args[3] = 'arg3' -- args[4] = 'arg4' return fulltableforcal1(args) end return _calendar
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/Xoristzatziki/testparams/doc
(
edit
)