Module:Sandbox/trappist the monk/title test

p={}

function p.title_test

local date_names = { ['en'] = {			-- English ['long']	= {['January']=1, ['February']=2, ['March']=3, ['April']=4, ['May']=5, ['June']=6, ['July']=7, ['August']=8, ['September']=9, ['October']=10, ['November']=11, ['December']=12}; ['short']	= {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12}; ['season']	= {['Winter']=24, ['Spring']=21, ['Summer']=22, ['Fall']=23, ['Autumn']=23}; ['named']	= {['Christmas']=99}; },	['local'] = {		-- replace these English date names with the local language equivalents ['long'] = {['ಜನವರಿ']=1, ['ಫೆಬ್ರುವರಿ']=2, ['ಮಾರ್ಚ್']=3, ['ಏಪ್ರಿಲ್']=4, ['ಮೇ']=5, ['ಜೂನ್']=6, ['ಜುಲೈ']=7, ['ಆಗಸ್ಟ್']=8, ['ಸೆಪ್ಟೆಂಬರ್']=9, ['ಅಕ್ಟೋಬರ್']=10, ['ನವೆಂಬರ್']=11, ['ಡಿಸೆಂಬರ್']=12 };		['short']	= {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12}; ['season']	= {['Winter']=24, ['Spring']=21, ['Summer']=22, ['Fall']=23, ['Autumn']=23}; ['named']	= {['Christmas']=99}; }	} local month ={ ['long'] = {['ಜನವರಿ']=1, ['ಫೆಬ್ರುವರಿ']=2, ['ಮಾರ್ಚ್']=3, ['ಏಪ್ರಿಲ್']=4, ['ಮೇ']=5, ['ಜೂನ್']=6, ['ಜುಲೈ']=7, ['ಆಗಸ್ಟ್']=8, ['ಸೆಪ್ಟೆಂಬರ್']=9, ['ಅಕ್ಟೋಬರ್']=10, ['ನವೆಂಬರ್']=11, ['ಡಿಸೆಂಬರ್']=12, };	};

local month=mw.ustring.match('ನವೆಂಬರ್ 2005', "([%D%S]-)%s*%d%d%d%d%a?");

--return date_names['local'].long['ನವೆಂಬರ್']; --month='ನವೆಂಬರ್'; --return month; -- == 'ನವೆಂಬರ್'; return date_names['local'].long[month] or month end

return p;