יחידה:PropertyLink: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מאין תקציר עריכה
שורה 332: שורה 332:
    elseif propValue['type'] == 'time' then
    elseif propValue['type'] == 'time' then
    local timeValue = Date.newFromWikidataValue( property.mainsnak.datavalue.value ):toHebrewString()
    local timeValue = Date.newFromWikidataValue( property.mainsnak.datavalue.value ):toHebrewString()
    local timeWarning = property['qualifiers'] and property['qualifiers']['P1480'] and property['qualifiers']['P1480'][1]
    and property['qualifiers']['P1480'][1].datavalue  and property['qualifiers']['P1480'][1].datavalue.value
    if timeWarning then
    timeWarning = timeWarning and timeWarning['id']
    if timeWarning == 'Q5727902' then
    timeValue = timeValue .. '[[Circa|?]]'
    else
    local circu = mw.wikibase.getLabelByLang( timeWarning, 'he' )
    if circu then
    timeValue = timeValue .. ' ' .. circu
    end
    end
    end
    --local timeValue = mw.wikibase.renderSnak( property.mainsnak )
    --local timeValue = mw.wikibase.renderSnak( property.mainsnak )
    timeValue = mw.ustring.gsub(timeValue, '^(%d+ %a+) (%d+)$', '[[%1]] [[%2]]')  
    timeValue = mw.ustring.gsub(timeValue, '^(%d+ %a+) (%d+)$', '[[%1]] [[%2]]')