Module:Sylheti/Digits

-- Return input text after converting en digits and month names. Testing compatibility, Unicode can be updated later. The Sylheti numeral system has similarities with Indo-Arabic (0,1,2,3,7,8,9), Mongolian (flipped 4 & 6) and Quarter moon (5) shapes.

local en_digits = { ['0'] = ,	['1'] = ,	['2'] = ,	['3'] = ,	['4'] = ,	['5'] = ,	['6'] = ,	['7'] = ,	['8'] = ,	['9'] = , }

local en_months = { ['January'] = 'ꠎꠣꠘꠃꠀꠞꠤ', ['january'] = 'ꠎꠣꠘꠃꠀꠞꠤ', ['February'] = 'ꠚꠦꠛꠃꠀꠞꠤ', ['february'] = 'ꠚꠦꠛꠃꠀꠞꠤ', ['March'] = 'ꠝꠣꠞ꠆ꠌ', ['march'] = 'ꠝꠣꠞ꠆ꠌ', ['April'] = 'ꠄꠙ꠆ꠞꠤꠟ', ['april'] = 'ꠄꠙ꠆ꠞꠤꠟ', ['May'] = 'ꠝꠦ', ['may'] = 'ꠝꠦ', ['June'] = 'ꠎꠥꠘ', ['june'] = 'ꠎꠥꠘ', ['July'] = 'ꠎꠥꠟꠣꠁ', ['july'] = 'ꠎꠥꠟꠣꠁ', ['August'] = 'ꠀꠉꠡꠐ', ['august'] = 'ꠀꠉꠡꠐ', ['September'] = 'ꠍꠦꠙꠐꠦꠝꠛꠞ', ['september'] = 'ꠍꠦꠙꠐꠦꠝꠛꠞ', ['October'] = 'ꠅꠇꠐꠥꠛꠞ', ['october'] = 'ꠅꠇꠐꠥꠛꠞ', ['November'] = 'ꠘꠜꠦꠝꠛꠞ', ['november'] = 'ꠘꠜꠦꠝꠛꠞ', ['December'] = 'ꠒꠤꠡꠦꠝꠛꠞ', ['december'] = 'ꠒꠤꠡꠦꠝꠛꠞ', }

local function _main(input) -- Callable from another module. input = input or '' return (input:gsub('%a+', en_months):gsub('%d', en_digits)) end

local function main(frame) -- Callable from #invoke or from a template. return _main(frame.args[1] or frame:getParent.args[1]) end

return { main = main, _main = _main }