Module:Sandbox/Arcorann/Chinese time explained

-- Load dependencies.local mm = require('Module:Math')local getArgs = require('Module:Arguments').getArgs

-- This module is intended to replace the entirety of Template:ctime and its subpages,-- which may be found at https://en.wikipedia.org/w/index.php?title=Special%3APrefixIndex&prefix=ctime&namespace=10&stripprefix=1

local heavenlyStems =

local elements =

local earthlyBranches =

local animals =

local solar_terms =

-- local function parse_datetime(str)-- -- converts a datetime into suitable format-- end

local function stembranch_nums(pos) -- returns the stem and branch numbers in ordinal form, given ordinal position in cycle stem = (pos - 1)%10 + 1 branch = (pos - 1)%12 + 1 return end

local function time_to_dayfrac(time) -- Accepts a time formattedend

local function dian(dayfrac) -- Accepts a day fraction -- Return the time in the diǎn system (60 diǎn in one day, beginning at midnight) -- replaces ctime:O return math.floor(dayfrac/60)end

local function gengdian(dayfrac) -- Accepts a day fraction -- Return the time in the Gēngdiǎn system (10 gēng in one day, sāngēng begins at midnight) return end

local function ke(dayfrac) -- Returns the current kè under the 100-kè system return math.floor(dayfrac/100)end

local function kec(dayfrac,n) --Returns the current kè under the 120-kè system, used from 7CE to around 20CE? return math.floor(dayfrac/120)end

local function shike(dayfrac) -- Returns the current shi and ke under the 100-ke system -- Each shi contains end

local function shikefen(dayfrac) -- Returns the current shi:ke:fen under the 100-ke, 60-fen systemend