query-bfa8a0ed5e06fbf26ac2a4ec5e19480c
]reply[21:25, 5 June 2020 (UTC) dosisEpìci sono cose da sistemare. Domani ti spiego meglio. Buona notte, --]reply[08:47, 6 June 2020 (UTC) Jura (if no other reference is given). --- (P1317)floruit An intermediate solution could be to change the property of these statements to ) for all dates would be too much work. explanation hereI suppose re-reading the source to check "ns1:dateType" (see Given the time it's there, I'm glad about any approach that solves it. ]reply[21:46, 5 June 2020 (UTC) dosisEpì: Wow, so it's an ancient problem; I've noticed it only today, I think. How about removing them all, in your opinion? --Jura1@ ]reply[21:35, 5 June 2020 (UTC) Jura. --- Wikidata:Bot_requests#Cleanup_VIAF_datesThat would be great. It's the same as More complete list of cases (note: it comprehends not only references to VIAF URLs, so has certainly some false positives):
Use at
- https://query.wikidata.org/sparql
PREFIX mwapi: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX psv: <http://www.wikidata.org/prop/statement/value/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?p ?db
WHERE
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint "www.wikidata.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "exturlusage" .
bd:serviceParam mwapi:geuprop "title" .
bd:serviceParam mwapi:geunamespace "0" .
bd:serviceParam mwapi:geuprotocol "https" .
bd:serviceParam mwapi:geuquery "viaf.org/viaf/" .
bd:serviceParam mwapi:geulimit "max" .
?p wikibase:apiOutputItem mwapi:title .
}
?p p:P569 [psv:P569 ?dbv ; prov:wasDerivedFrom [pr:P854 ?site] ].
FILTER CONTAINS(STR(?site),"viaf.org/viaf/")
?dbv wikibase:timeValue ?db; wikibase:timePrecision ?precision.
BIND (YEAR(?db) AS ?year)
FILTER(?precision = 9)
FILTER IF(?year > 0,
?year - FLOOR(?year / 100) * 100 = 50, # year is AD
?year - FLOOR(?year / 100) * 100 = 51) # year is BC, 1 BC is encoded as "0", 2 BC as "-1" etc.
}