Module:Date2en: Difference between revisions
admin>Admin صفحهای تازه حاوی «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, "...» ایجاد کرد |
m ۱ نسخه واردشده |
(No difference)
| |
Revision as of 22:34, May 25, 2025
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