User:GreenC/software/base62.lua: Difference between revisions

Content deleted Content added
No edit summary
m علاء moved page User:Green Cardamom/software/base62.lua to User:GreenC/software/base62.lua: Automatically moved page while renaming the user "Green Cardamom" to "GreenC"
 
(2 intermediate revisions by one other user not shown)
Line 1:
Given a WebCite ID taken from a URL ( http://www.webcitation.org/6KmF9nYxg ) return dates in multiple formats.
 
Example:
 
:<syntaxhighlight lang="lua" style="display: table; font-size: 11px;">
mintbox:[/home/adminuser] ./base62.lua 6KmF9nYxg
October 31, 2013|31 October 2013|2013-10-31|2013 October 31
</syntaxhighlight>
 
----
 
Base62.lua
 
::<syntaxhighlight lang="lua" style="display: table; font-size: 11px;">
 
Line 6 ⟶ 19:
-- example ID: 6H8pdR68H
 
-- http://convertxy.com/index.php/numberbases/
-- http://www.onlineconversion.com/unix_time.htm
 
Line 65 ⟶ 78:
day = tonumber(day)
 
if year < 1970 or year > 20202060 then
print "error"
elseif day < 1 or day > 31 then