יחידה:PropertyLink: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 4: | שורה 4: | ||
function asOfDateQuanifier(property) | function asOfDateQuanifier(property) | ||
local AS_OF_PROPERTY = 'P585' | local AS_OF_PROPERTY = 'P585' | ||
local as_of_value = (property.qualifiers and property.qualifiers[AS_OF_PROPERTY] and property.qualifiers[AS_OF_PROPERTY].value and property.qualifiers[AS_OF_PROPERTY].value.time) | local as_of_value = (property.qualifiers and property.qualifiers[AS_OF_PROPERTY] and property.qualifiers[AS_OF_PROPERTY] and property.qualifiers[AS_OF_PROPERTY][0].value and property.qualifiers[AS_OF_PROPERTY][0].value.time) | ||
if as_of_value then | if as_of_value then | ||
-- hack to extract the year associated with "as of date". be careful - it doesn't take to account the precision... | -- hack to extract the year associated with "as of date". be careful - it doesn't take to account the precision... | ||