Module talk:Wd/Archive 1: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Wd) (bot
m Archiving 1 discussion(s) from Module talk:Wd) (bot
Line 729:
{{ping|Thayts}} I was asked today how to call Module:Wd from other modules, so I made a brief demo at [[Module:Sandbox/RexxS/Wd]] and put some comparisons with the corresponding {{tl|Wikidata}} calls on its talk page at [[Module talk:Sandbox/RexxS/Wd]]. I don't want to mess with your documentation, but I think those simple examples would prove useful to budding coders. Please feel free to take them and use them any way you want - absolutely no attribution required. Cheers --[[User:RexxS|RexxS]] ([[User talk:RexxS|talk]]) 21:56, 20 February 2021 (UTC)
:Thanks {{u|RexxS}}, I'll take a look! [[User:Thayts|<span style="color:#466383;font-family:Georgia;font-style:italic;letter-spacing:1px">Thayts</span>]]&nbsp;[[User talk:Thayts|<span style="color:#7892A5">•••</span>]] 10:16, 21 February 2021 (UTC)
 
== Get a person's date of birth from Wikidata ==
 
Good morning. Sorry if I write here, I don't know if it is the best place to ask the following question: How do I get from Wikidata the date of birth of a person expressed in day and month without the year (DD-MM)?
Which template is the most suitable for obtaining this type of data? it's possible? Many thanks to anyone who would answer the courtesy and helpfulness. --[[User:Fierodelveneto|Fierodelveneto]] ([[User talk:Fierodelveneto|talk]]) 10:17, 23 April 2021 (UTC)
:At enwiki, getting a date of birth from Wikidata is controversial although some templates do it. It's controversial because the result rarely has a reliable source and is easily broken by hard-to-find vandalism. However, if you can get a valid date, you can use #time ([[mw:Help:Extension:ParserFunctions]]) to change it to your desired format. For example,
:*<code><nowiki>{{#time:d-m|1 April 1982}}</nowiki></code> → {{#time:d-m|1 April 2012}}
:In general, [[WP:VPT]] might be a better place for questions like this. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 10:45, 23 April 2021 (UTC)
::{{Ping|Johnuniq}} Hello! Thank you for your answer. So you can use it in the {{tl|WikidataOi}} template with the {{property|569|id = o}} property? Could you give me an example applied with the parser function? Thank you very much! --[[User:Fierodelveneto|Fierodelveneto]] ([[User talk:Fierodelveneto|talk]]) 14:43, 23 April 2021 (UTC)
:::{{re|Fierodelveneto}} For example,
:::{{tnull|#time:d-m|{{((}}wikidataoi|property|raw|Q6279|P569|fetch{{=}}true{{))}}}} → {{#time:d-m|{{wikidataoi|property|raw|Q6279|P569|fetch=true}}}}
:::[[User:Thayts|<span style="color:#466383;font-family:Georgia;font-style:italic;letter-spacing:1px">Thayts</span>]]&nbsp;[[User talk:Thayts|<span style="color:#7892A5">•••</span>]] 21:13, 23 April 2021 (UTC)