Module:Sandbox/RDKTSR

--to be used intended for Userpage User:RDKTSR only local p = {} local DOM = {31,28,31,30,31,30,31,31,30,31,30,31} local DWN = {"Mo","Tu","We","Th","Fr","Sa","Su"} function SUBT(A,B,C) return string.sub(tostring(A),B,C) end function FLR(A) return math.floor(A) end function LY_CHECK(year) if(year % 400 == 0) then return true else if(year % 100 == 0) then return false else if(year % 4 == 0) then return true end end end return false end local EMTSMN={ "Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Thetha","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron", "Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","Alfa","Bravo","Charlie","Delta","Echo","Foxtrot","Golf", "Hotel","Indy","Juliett","Kilo","Lima","Mike","Nova","Oscar","Papo","Quilt","Romeo","Siesta","Tango","Uniform","Vims","Whistle", "Xeorx","Yumi","Zulu","Zen","Bloxxer","Rex","Raptor"} local ZGNL = {"Zerozat","Onezat","Twozat","Threezat","Fourzat","Fivezat","Sixzat"} local EGNL = {"Zerode","Onede","Twode","Threede","Fourde","Fivede","Sixede","Sevende","Eightde","Ninede"} local CGNL = {"Zeroer","Oner","Twoer","Threer","Fourer","Fiver","Sixer","Sevener","Eighter","Niner"} function ELTFORMAT(ELTBASE) local ELT_THOU=FLR(ELTBASE*1000)%1000 local ELT_1u = FLR(ELTBASE/1)%1000 local ELT_1k = FLR(ELTBASE/1e3)%1000 local ELT_1m = FLR(ELTBASE/1e6)%1000 local ELT_1n = FLR(ELTBASE/1e9)%1000 local ELT_1t = FLR(ELTBASE/1e12)%1000 return ELT_1t..",".. SUBT(ELT_1n+1000,2,4)..",".. SUBT(ELT_1m+1000,2,4)..",".. SUBT(ELT_1k+1000,2,4)..",".. SUBT(ELT_1u+1000,2,4)..".".. SUBT((ELT_THOU + 1000),2, 4) end function EMTS(TIME) local SYR = 365.2425 local LUN = 29.530589 local TIMEY = TIME/86400 local SYR = 365.2425 local LUN = 29.530589 local TIMEYL = FLR(TIMEY + 25567) local TIMEYLW = FLR(TIMEYL/7)*7 local TIMEYW = FLR((TIMEY+354280)/7)*7 local TIMEYD = FLR(TIMEY) - 10957 local TIMEYW1 = FLR((TIMEYD-366)/7)*7 TIMEYE = math.floor(TIMEY) + 354285 TIMEYS = TIMEYD-79 YRE = TIMEYS/SYR+1000 YRC = YRE+0.25 YRW = YRC+0.125 LUNE=math.floor(TIMEYL / LUN)+11131 LUNA=LUNE-633 XRE = math.floor((YRE%1) * SYR) XRC = math.floor((YRC%1) * SYR) XRW = math.floor((YRW%1) * SYR) LUNR = EMTSMN[math.floor(LUNA % (SYR / LUN))+1] CELTICMONTH = {"Birch","Rowan","Ash","Alder","Willow","Hawthorn","Oak","Holly","Hazel","Vine","Ivy","Reed","Elder"} WICCANMONTH = {"Samhain","Yule","Imbolc","Ostra","Bectane","Litha","Lughnasadn","Mabon"} ZODIACMONTH = {"Aries","Taurus","Gemeni","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"} CELTICDATE = "CELTIC: "..CELTICMONTH[(math.floor(XRC/(SYR/13)))+1]	.." "..(math.floor(XRC%(SYR/13))+1)	..", EY"..math.floor(YRC) WICCANDATE = "WICCAN: "..WICCANMONTH[(math.floor(XRW/(SYR/ 8)))+1]	.." "..(math.floor(XRW%(SYR/ 8))+1)	..", EY"..math.floor(YRW) ZODIACDATE = "ZODIAC: "..ZODIACMONTH[(math.floor(XRE/(SYR/12)))+1]	.." "..(math.floor(XRE%(SYR/12))+1)	..", EY"..math.floor(YRE) LUNARDATE = "LUNISOL: "..LUNR  									.." "..(math.floor(TIMEYL%LUN)+1)	..", EY"..math.floor((LUNA/(SYR/LUN))+51) ASSEDR = ZODIACDATE.." / "..LUNARDATE.." "..WICCANDATE.." / "..CELTICDATE local ELSC = EMTSMN[FLR(FLR(TIMEYL / LUN) % (SYR / LUN)) + 1].. " "..(FLR(TIMEYL % LUN) + 1).. " "..(FLR(FLR(TIMEYL / LUN) / (SYR / LUN)) + 900).. " ELSC" local ELC = EMTSMN[FLR((FLR(TIMEYL / LUN) + 11131) % 12) + 1].. " "..(FLR(TIMEYL % LUN) + 1).. " "..FLR((FLR(TIMEYL / LUN) + 11131) / 12).. " ELC" local ELXC =EMTSMN[FLR(FLR(TIMEYLW / LUN) % (SYR / LUN)) + 1].. " "..(FLR((TIMEYLW % LUN)/7)*7+FLR((TIMEY+3)%7)+1).. " ".. (FLR(FLR(TIMEYLW / LUN) / (SYR / LUN)) + 900).. " ELXC" local ELWC = EMTSMN[FLR((FLR(TIMEYLW / LUN) + 11131) % 12) + 1].. " ".. (FLR((TIMEYLW % LUN)/7)*7+FLR((TIMEY+3)%7)+1).. " " ..   FLR((FLR(TIMEYLW / LUN) + 11131) / 12).. " ELWC" local DOYF = SYR local DOYR = SYR local EWC = EMTSMN[FLR(FLR(TIMEYW1 % SYR) / (DOYF / 12)) + 1].. " ".. ((FLR(FLR(FLR(TIMEYW1 % SYR) % (DOYF / 12)) / 7)*7)+FLR((TIMEY+3)%7)+1).. " " ..   FLR(TIMEYW1 / SYR + 1001).. " EWC" local EWDC = EMTSMN[FLR(FLR(TIMEYW1 % SYR) / (DOYF / 10)) + 1].. " ".. ((FLR(FLR(FLR(TIMEYW1 % SYR) % (DOYF / 10)) / 7)*7)+FLR((TIMEY+3)%7)+1).. " " ..   FLR(TIMEYW1 / SYR + 1001).. " EWDC" local EMD1 = FLR((FLR(TIMEY) - 10957) / 100).. "."..SUBT((FLR((FLR(TIMEY) - 10957) % 100) + 100),2, 3).. " EMD.M MLE" local ZYCLE = "Z"..FLR((FLR(TIMEY) - 10957) / 70).. "."..SUBT((FLR((FLR(TIMEY) - 10957) % 70) + 100),2, 3) local EMD2 = FLR((FLR(TIMEY) + 354285) / 1000).. "."..FLR(((FLR(TIMEY) + 354285) / 100) % 10).. "."..SUBT((FLR((FLR(TIMEY) + 354285) % 100) + 100),2, 3).. " EMD.E ELE" local EMD = EMD1.."/"..EMD2 local EMDspeech = FLR((FLR(TIMEY) - 10957) / 100).. " "..SUBT((FLR((FLR(TIMEY) - 10957) % 100) + 100),2, 3).." E M D Millenial".. " "..FLR((FLR(TIMEY) + 354285) / 1000).. " "..FLR(((FLR(TIMEY) + 354285) / 100) % 10).. " "..SUBT((FLR((FLR(TIMEY) + 354285) % 100) + 100),2, 3).." EMD Elite" local ELD1 = "E/EY"..(FLR((FLR(TIMEY) - 10957) / SYR) + 1000).." EE ED"..SUBT((FLR(TIMEYD % SYR) + 1000),2, 4) local ELD2 = "ZL"..SUBT(FLR((FLR(TIMEYD % SYR)+(7-((FLR(TIMEYD % SYR)-FLR((TIMEY+3)%7)+7)%7)))/7)+100,2,3).. " EW"..SUBT(FLR(FLR(TIMEYD % SYR) / 10)+100,2,3).. " ZG"..((FLR(TIMEY) - 4) % 7).. " EG"..FLR(FLR((FLR(TIMEY) - 10957) % SYR) % 10).. " CG"..FLR(((FLR(TIMEY) + 354285)) % 10) local ELD3 = EMTSMN[FLR((FLR(TIMEYD % SYR)+(7-((FLR(TIMEYD % SYR)-FLR((TIMEY+3)%7)+7)%7)))/7)+1].. "-"..EMTSMN[FLR(FLR(TIMEYD % SYR) / 10)+1].. "/"..ZGNL[((FLR(TIMEY) - 4) % 7)+1].. "-"..EGNL[FLR(FLR((FLR(TIMEY) - 10957) % SYR) % 10)+1].. "-"..CGNL[FLR(((FLR(TIMEY) + 354285)) % 10)+1] local ELD = ELD1.." "..ELD2 local ESC = EMTSMN[FLR(FLR(TIMEYD % SYR) / (DOYR / 12)) + 1].. " ".. (FLR(FLR(TIMEYD % SYR) % (DOYR / 12)) + 1).. " "..(FLR((FLR(TIMEY) - 10957) / SYR) + 1000).. " ESC" local EDC = EMTSMN[FLR(FLR(TIMEYD % SYR) / (DOYR / 10)) + 1].. " "..(FLR(FLR(TIMEYD % SYR) % (DOYR / 10)) + 1).. " "..(FLR((FLR(TIMEY) - 10957) / SYR) + 1000).. " EDC" local SEDT = FLR(TIMEY) .."."..SUBT((FLR(((TIMEY) * 1000) % 1000 + 1000)),2, 4) .." "..SUBT((FLR(((TIMEY) * 1000000) % 1000 + 1000)),2, 4).. " rm SEDT" local SEDT1 = FLR(TIMEY).." rams S E D T"	local ELTBASE = (TIMEY+354285)/SYR*1e9+0.0005 local ELT = ELTFORMAT(ELTBASE).." tm ELT" local ZD = FLR((4371952 + FLR(TIMEY)) / 1000000)..",".. SUBT(FLR((4371952 + FLR(TIMEY)) / 1000 % 1000)+1000,2,4)..",".. SUBT(FLR((4371952 + FLR(TIMEY)) % 1000)      +1000,2,4) .." ZD" local XD = FLR((FLR(TIMEY) + 354285) / 400).. "."..(FLR((FLR(TIMEY) + 354285) / 40) % 10).. ".".. SUBT((FLR(TIMEY + 354285) % 40)+100,2,3).. " XD" local XXD = (FLR(TIMEYW / 40) % 10).. ".".. SUBT(((FLR((TIMEYW % 40)/7)*7)+FLR((TIMEY+3)%7)+1)+100,2,3).. " XXD" local XLD = SUBT(FLR((FLR(TIMEYL / LUN) + 11132) % (400 / LUN)) + 100,2,3).. ".".. SUBT(FLR(TIMEYL % LUN)+100,2,3).. " XLD" local XLXD = SUBT(FLR((FLR(TIMEYLW / LUN) + 11132) % (400 / LUN)) + 100,2,3).. ".".. SUBT((FLR((TIMEYLW % LUN)/7)*7+FLR((TIMEY+3)%7))+100,2,3).. " XLXD" local XD1 = (FLR((FLR(TIMEY) + 354285) / 40) % 10).." ".. (FLR(TIMEY + 354285) % 40).. " Xen date on xen year "..FLR((FLR(TIMEY) + 354285) / 400) local XXD1 = (FLR(TIMEYW / 40) % 10).." "..((FLR((TIMEYW % 40)/7)*7)+FLR((TIMEY+3)%7)+1).." X X D" local XLD1 = FLR((FLR(TIMEYL / LUN) + 11132) % (400 / LUN)).." ".. FLR(TIMEYL % LUN).." X L D" local XLXD1 = FLR((FLR(TIMEYLW / LUN) + 11132) % (400 / LUN)).." "..(FLR((TIMEYLW % LUN)/7)*7+FLR((TIMEY+3)%7)).." X L X D" local XT = SUBT((((TIMEY) % 1) * 20 + 100),2, 3)..":".. SUBT(((((TIMEY) % 1) * 20 * 50) % 50 + 100),2, 3)..".".. SUBT(((((TIMEY) % 1) * 20 * 50 * 100) % 100 + 100),2, 3).."'".. SUBT(((((TIMEY) % 1) * 20 * 50 * 100 * 100) % 100 + 100),2, 3).."\" XT"	local ECX = SUBT((((TIMEY) % 1) * 96 + 100),2, 3).."."..		SUBT(((((TIMEY) % 1) * 96 * 100) % 100 + 100),2, 3).."'"..		SUBT(((((TIMEY) % 1) * 96 * 100 * 100) % 100 + 100),2, 3).."\"".. SUBT(((((TIMEY) % 1) * 96 * 100 * 100 * 100) % 100 + 100),2, 3).." ECX " local EXT = SUBT((((TIMEY) % 1) * 24 + 100),2, 3)..".".. SUBT(((((TIMEY) % 1) * 24 * 100) % 100 + 100),2, 3).."'".. SUBT(((((TIMEY) % 1) * 24 * 100 * 100) % 100 + 100),2, 3).."\""..		SUBT(((((TIMEY) % 1) * 24 * 100 * 100 * 100) % 100 + 100),2, 3).." EXT"	local SPT = SUBT(FLR((FLR(TIMEY) - 9131) / 1000)+100,2,3).."."..		FLR(((FLR(TIMEY) - 9131) / 100) % 10).."."..		SUBT(FLR((FLR(TIMEY) - 9131) % 100)+100,2,3).." "..		SUBT((((TIMEY) % 1) * 100 + 100),2, 3).."."..		SUBT(((((TIMEY) % 1) * 100 * 100) % 100 + 100),2, 3).."'"..		SUBT(((((TIMEY) % 1) * 100 * 100 * 100) % 100 + 100),2, 3).."\"".. SUBT(((((TIMEY) % 1) * 100 * 100 * 100 * 100) % 100 + 100),2, 3).." SPT" local WCT = SUBT(FLR((FLR(TIMEY) - 9131) / 400 )+100,2,3)..".".. FLR(((FLR(TIMEY) - 9131) / 40) % 10)..".".. SUBT(FLR((FLR(TIMEY) - 9131) % 40)+100,2,3).." ".. SUBT((((TIMEY) % 1) * 40 + 100),2, 3)..".".. SUBT(((((TIMEY) % 1) * 40 * 100) % 100 + 100),2, 3).."'".. SUBT(((((TIMEY) % 1) * 40 * 100 * 100) % 100 + 100),2, 3).."\""..		SUBT(((((TIMEY) % 1) * 40 * 100 * 100 * 100) % 100 + 100),2, 3).." WCT"	local Chois = SUBT((FLR((((TIMEY) * 100) % 100)) + 100),2, 3)	local doCh = (FLR((((TIMEY) * 100) % 100) * 10) % 10)	local koCh = SUBT((FLR((((TIMEY) * 100) % 100) * 1000) % 100 + 100),2, 3).." "..SUBT((FLR((((TIMEY) * 100) % 100) * 1000000) % 1000 + 1000),2, 4)	local UHR = (FLR((FLR(TIME/3600)%24)/10))..(FLR((FLR(TIME/3600)%24)%10))	local DIN = (FLR((FLR(TIME/36)%100)/10))..(FLR((FLR(TIME/36)%100)%10))	local DES1 = (FLR((FLR(TIME/0.36)%100)/10))..(FLR((FLR(TIME/0.36)%100)%10))	local DES2 = (FLR((FLR(TIME/0.36*100)%36)/10))..(FLR((FLR(TIME/0.36*100)%36)%10))	EMT=Chois.."."..doCh..koCh.." ".."EMT"	TRX=UHR.."."..DIN..":"..DES1.."."..DES2.." ".."TRX"	local MDIN1 = (FLR((FLR(TIME/86400*64)%64)/10))     ..(FLR((FLR(TIME/86400*64)%64)%10))	local MDIN2 = (FLR((FLR(TIME/86400*6400)%100)/10))    ..(FLR((FLR(TIME/86400*6400)%100)%10))	local MDES1 = (FLR((FLR(TIME/86400*640000)%100)/10))  ..(FLR((FLR(TIME/86400*640000)%100)%10))	local MDES2 = (FLR((FLR(TIME/86400*64000000)%100)/10))..(FLR((FLR(TIME/86400*64000000)%100)%10))	MILTIME = MDIN1.."."..MDIN2..":"..MDES1.."."..MDES2.." MLT"	return EMT.."/"..TRX.."/"..MILTIME.." "..	           ELD.." "..ELD3.." "..EMD.."/"..ZYCLE.." "..ESC.."/"..EDC				.." "..ELSC.."/"..ELC.." "..EWC.."/"..EWDC				.." "..ELXC.."/"..ELWC.." "..ASSEDR.." "..				XD.." - "..XLD.." - "..XXD.." - "..XLXD.." "..SEDT.." - "..ZD.." "..ELT.." "..			ECX.." - "..EXT.." - "..XT.." "..SPT.." - "..WCT

end function CLK(UTIME,TZ,TZN) local LTIME = UTIME+(TZ*3600) local LHR = (FLR((FLR(LTIME/3600)%24)/10))..(FLR((FLR(LTIME/3600)%24)%10)) local UHR = (FLR((FLR(UTIME/3600)%24)/10))..(FLR((FLR(UTIME/3600)%24)%10)) local MIN = (FLR((FLR(LTIME/60)%60)/10))..(FLR((FLR(LTIME/60)%60)%10)) local SEC = (FLR((FLR(LTIME)%60)/10))..(FLR((FLR(LTIME)%60)%10)) local DC = FLR(LTIME/86400) DOM[2] = 28 + ((LY_CHECK(FLR((DC+719528)/365.2425)) and 1) or 0) local DAY = FLR((DC+719528)%365.2425)+1 local MONTH = 0 for i, v in pairs(DOM) do if(DAY > v) then DAY = DAY - v else MONTH = i break end end local currentdate = (FLR((FLR(DC+FLR(1970*365.2425))+1)/365.2425)).."."..(string.sub(MONTH+100,2,3)).."."..(string.sub(DAY+100,2,3)).."-"..(DWN[(FLR(DC+3)%7)+1]) return currentdate.." "..LHR..":"..MIN..":"..SEC.." "..TZN end function p.emts return EMTS(os.time) end function p.timestamp(frame) return CLK(os.time,frame.args[1],frame.args[2]) end return p