Module:Date2en

د ويکيپېډيا، وړیا پوهنغونډ له خوا

لاسوند لپاره ددې موډيول کېدای سی په Module:Date2en/لاسوند کي وي

local p = {}

local numConv = require( "Module:Numeral converter" ).convert

-- Use this function from templates.
function p.convert_template(frame)
  return p.convert(frame.args[1])
end

-- Use this function directly in modules.
function p.convert(text)
	text = mw.ustring.gsub(text, "ٔ", "")
	text = mw.ustring.gsub(text, "جنوري", "January")
	text = mw.ustring.gsub(text, "فيبروري", "February")
	text = mw.ustring.gsub(text, "مارچ", "March")
	text = mw.ustring.gsub(text, "اپرېل", "April")
	text = mw.ustring.gsub(text, "می", "May")
	text = mw.ustring.gsub(text, "جون", "June")
	text = mw.ustring.gsub(text, "جولای", "July")
	text = mw.ustring.gsub(text, "اګست", "August")
	text = mw.ustring.gsub(text, "سېپټمبر", "September")
	text = mw.ustring.gsub(text, "اکتوبر", "October")
	text = mw.ustring.gsub(text, "نومبر", "November")
	text = mw.ustring.gsub(text, "ډېسمبر", "December")
	text = mw.ustring.gsub(text, "ساعتونه", "hours")
	text = mw.ustring.gsub(text, "ورځې", "days")
	text = mw.ustring.gsub(text, "اوونۍ", "weeks")
	text = mw.ustring.gsub(text, "مياشتې", "months")
	text = mw.ustring.gsub(text, "کلونه", "years")
	
	return numConv("en", text)
end

return p