Module:ConfigRepository: Difference between revisions

// via Wikitext Extension for VSCode
// via Wikitext Extension for VSCode
Line 52: Line 52:
             -- Property mappings (semantic property to template field)
             -- Property mappings (semantic property to template field)
             properties = {
             properties = {
                 ["Has event start date"] = "start",
                 ["Has start date"] = "start",
                 ["Has event end date"] = "end",
                 ["Has end date"] = "end",
                 ["Part of process"] = "process",
                 ["Part of process"] = "process",
                 -- "Has country" and "Has ICANN region" handled by CountryData.addCountrySemanticProperties
                 -- "Has country" and "Has ICANN region" handled by CountryData.addCountrySemanticProperties
Line 70: Line 70:
             -- Transformation functions for properties
             -- Transformation functions for properties
             transforms = {
             transforms = {
                 ["Has event start date"] = function(value)
                 ["Has start date"] = function(value)
                     return tostring(require('Module:DateNormalization').formatDate(value))
                     return tostring(require('Module:DateNormalization').formatDate(value))
                 end,
                 end,
                 ["Has event end date"] = function(value)
                 ["Has end date"] = function(value)
                     return tostring(require('Module:DateNormalization').formatDate(value))
                     return tostring(require('Module:DateNormalization').formatDate(value))
                 end
                 end