https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3APopulation_clocks Module:Population clocks - Revision history 2025-05-27T18:47:19Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=Module:Population_clocks&diff=555138978&oldid=prev Kaldari: Copying from test2 for tutorial use, written by User:Uncle G 2013-05-15T00:32:05Z <p>Copying from test2 for tutorial use, written by <a href="/wiki/User:Uncle_G" title="User:Uncle G">User:Uncle G</a></p> <p><b>New page</b></p><div>--require &quot;math&quot;<br /> <br /> local z = {}<br /> <br /> function MJDN(date)<br /> local floor = math.floor<br /> local a = floor((14 - date.mon) / 12)<br /> local y = date.year + 4800 - a<br /> local m = date.mon + 12 * a - 3<br /> return date.day + floor((153 * m + 2) / 5) + 365 * y + floor(y / 4) - floor(y / 100) + floor(y / 400) - 2432046<br /> end<br /> <br /> function dayssince(epoch, now)<br /> return MJDN(now) - MJDN(epoch)<br /> end<br /> <br /> -- The population clock for India uses these data:<br /> -- -- According to the 2011 census there were 1,21,01,93,422 people on 2011-03-01 00:00:00 +0530.<br /> -- -- According to the 2011 census the 2001-2011 decadal growth rate was 17.64%.<br /> -- Growth is slowing according to the census, so this is an OVER-estimate.<br /> -- http://censusindia.gov.in/2011-prov-results/PPT_2.html<br /> function z.india (frame)<br /> local pframe = frame:getParent()<br /> local args = pframe.args -- the arguments passed TO the template, in the wikitext that instantiates the template<br /> local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself<br /> local now = { year=config.as_of_year, mon=config.as_of_month, day=config.as_of_day }<br /> return 1210193422 + 58455.12 * dayssince({year=2011,mon=2,day=28}, now)<br /> end<br /> <br /> return z</div> Kaldari