Help talk:Property constraints portal/Diff within range

Typo or ?

edit

Thank you for writing nice document. This helps a lot. By the way, there is text   in the second line. What does this a mean? --Was a bee (talk) 17:43, 19 May 2018 (UTC)Reply

@Was a bee: the “a” is the unit symbol for year (Q577). But to be honest I’m not sure if the whole interval is even work worth having, or whether it just confuses people… --Lucas Werkmeister (WMDE) (talk) 21:41, 19 May 2018 (UTC)Reply
@Lucas Werkmeister (WMDE): Ah, abbreviation of year. Thanks. Even if reader doesn't know notation of w:en:Interval (mathematics), if reader is fluent in English, I think that explanation style is not confusing. This question came from simply from my en-1. ;) --Was a bee (talk) 15:49, 20 May 2018 (UTC)Reply

error on diff calculation

edit

In the date of death (P570) of Pau Florejachs i Viladomiu (Q42155415) it shows an incorrect error message. The P569 = 19. century and P570 = 20 June 1887. So, no more than 87 years. I think it is due by different precision dates. Thanks, Amadalvarez (talk) 20:46, 15 February 2019 (UTC)Reply

@Amadalvarez: this happens because the timestamp for the date of birth specifies the year 1900 (the last year of the 19th century), which means that it looks like this man died before he was born. Until T195226 is properly fixed, you can silence the violation message by setting the timestamp to something else, e. g. 1825 (following the refine date (P4241)first quarter (Q40690303) qualifier), while keeping the precision the same (century). This will also help, for example, users of the query service, who also see the raw timestamp (which this would improve). --Lucas Werkmeister (WMDE) (talk) 14:39, 1 March 2019 (UTC)Reply

Difference within range constraint

edit

On Q364831 I get the error message "The difference between date of birth (14. century) and date of death (6 February 1390) should be between 0 year and 150 year." I don't understand this message. Is the software not able to calculate? Or did I miss a important memo in which has been decided that the year 1390 is no longer part of the 14th century? Regards, Royalty & Nassau Expert (talk) 23:41, 5 June 2020 (UTC)Reply

@Royalty & Nassau Expert: This is due to T168379 – the constraints extension ignores the precision and calculates the difference using the actual timestamp stored for the value, which in this case is the latest year in the 14th century, 1400 (you can see this e. g. in Special:Diff/1199921609), so the difference is roughly negative ten years, which is outside the allowed range. You can work around the issue by manually setting a different, more plausible timestamp while keeping the precision at “century”. (That timestamp is also exported to the query service, for instance, so that might help there as well.) --Lucas Werkmeister (WMDE) (talk) 10:11, 8 June 2020 (UTC)Reply
@Lucas Werkmeister (WMDE): Thanks for your reply. It's clear to me now. I must admit that I prefer to wait until the issue is solved instead of going to try to work around it. In this case we will never get an answer to the question in which year this person was born. Some sources state it was in 1345 or 1345/46 and other sources state it was in 1353. This also makes it difficult to pick a workaround as neither a decade nor a quarter of a century will work. But I really appreciate that you took the time to explain it! Regards, --Royalty & Nassau Expert (talk) 16:53, 8 June 2020 (UTC)Reply

Months are not supported

edit

Another problem with the time handling in the checker is that ranges specified in months are not supported and all constraints report failure with no indication of why. Currently, the code special-cases limits specified in years (with both min&max required to be in years) and for everything else, it converts the difference and the limits to the basic unit (for time values, seconds) and then compares just the numbers. However, months are not convertible to seconds, so this fails. I had to modify Property:P4602 from “max 18 months” to “max 550 days” because of this. --Mormegil (talk) 10:53, 8 January 2021 (UTC)Reply

Return to "Property constraints portal/Diff within range" page.