Modul:Iraq Syria map date: Perbedaan antara revisi
Tampilan
Konten dihapus Konten ditambahkan
import improvements from enwiki |
update from enwiki |
||
(5 revisi perantara oleh pengguna yang sama tidak ditampilkan) | |||
Baris 1: | Baris 1: | ||
⚫ | |||
require('Module:No globals') |
|||
local dts = require('Module:Dts')._main |
|||
⚫ | |||
--[[ |
--[[ |
||
The purpose of this file is to have a centralised place where the dates which File:Syrian,_Iraqi,_and_Lebanese_insurgencies.png (and related files) is updated can be managed, instead of having to update them in different articles. |
The purpose of this file is to have a centralised place where the dates which File:Syrian,_Iraqi,_and_Lebanese_insurgencies.png (and related files) is updated can be managed, instead of having to update them in different articles. |
||
Baris 7: | Baris 5: | ||
To update, edit the strings (the parts between quotes) underneath each function. |
To update, edit the strings (the parts between quotes) underneath each function. |
||
For maintainability of modules being used on other-language Wikipedias, you must use ISO date: YYYY-MM-DD (i.e. 2015-12-09) |
For maintainability of modules being used on other-language Wikipedias, you must use ISO date: YYYY-MM-DD (i.e. 2015-12-09) |
||
The output will be a correct wordy date format (i.e. "9 |
The output will be a correct wordy date format (i.e. "9 Desember 2015", or "9 tháng 12 năm 2015" if you're on Vietnamese Wikipedia) |
||
Example usage: "(as of {{#invoke:Iraq Syria map date|syriadate}})" |
Example usage: "(as of {{#invoke:Iraq Syria map date|syriadate}})" |
||
Baris 13: | Baris 11: | ||
function p.date( frame ) |
function p.date( frame ) |
||
return dts |
return dts("2016-11-09", frame) -- [[commons:File:Syrian,_Iraqi,_and_Lebanese_insurgencies.png]] |
||
end |
end |
||
function p.iraqdate( frame ) |
function p.iraqdate( frame ) |
||
return dts |
return dts("2016-09-24", frame) -- [[commons:File:Iraq_war_map.png]] |
||
end |
end |
||
function p.syriadate( frame ) |
function p.syriadate( frame ) |
||
return dts |
return dts("2016-08-12", frame) -- [[commons:File:Syrian_civil_war.png]] |
||
end |
end |
||
function p.aleppo2date( frame ) |
function p.aleppo2date( frame ) |
||
return dts |
return dts("2016-11-06", frame) -- [[commons:File:Rif Aleppo2.svg]] |
||
end |
|||
function p.damascusdate( frame ) |
|||
return dts("2016-10-30", frame) -- [[commons:File:Rif Damashq.svg]] |
|||
end |
end |
||
function p.lebanondate( frame ) |
function p.lebanondate( frame ) |
||
return dts |
return dts("2015-10-16", frame) -- [[commons:File:Lebanese_insurgency.png]] |
||
end |
|||
function dts( d, frame ) |
|||
return frame:expandTemplate{ title="Dts", args = {d} } |
|||
end |
end |
||
Revisi terkini sejak 10 November 2016 00.51
local p = {}
--[[
The purpose of this file is to have a centralised place where the dates which File:Syrian,_Iraqi,_and_Lebanese_insurgencies.png (and related files) is updated can be managed, instead of having to update them in different articles.
To update, edit the strings (the parts between quotes) underneath each function.
For maintainability of modules being used on other-language Wikipedias, you must use ISO date: YYYY-MM-DD (i.e. 2015-12-09)
The output will be a correct wordy date format (i.e. "9 Desember 2015", or "9 tháng 12 năm 2015" if you're on Vietnamese Wikipedia)
Example usage: "(as of {{#invoke:Iraq Syria map date|syriadate}})"
--]]
function p.date( frame )
return dts("2016-11-09", frame) -- [[commons:File:Syrian,_Iraqi,_and_Lebanese_insurgencies.png]]
end
function p.iraqdate( frame )
return dts("2016-09-24", frame) -- [[commons:File:Iraq_war_map.png]]
end
function p.syriadate( frame )
return dts("2016-08-12", frame) -- [[commons:File:Syrian_civil_war.png]]
end
function p.aleppo2date( frame )
return dts("2016-11-06", frame) -- [[commons:File:Rif Aleppo2.svg]]
end
function p.damascusdate( frame )
return dts("2016-10-30", frame) -- [[commons:File:Rif Damashq.svg]]
end
function p.lebanondate( frame )
return dts("2015-10-16", frame) -- [[commons:File:Lebanese_insurgency.png]]
end
function dts( d, frame )
return frame:expandTemplate{ title="Dts", args = {d} }
end
return p