Implemented for the KB upload in T202400. Since it's batch-specific, it automatically compares birth/death dates in the YYYY/YYYYMMDD formats and prevents a lower-precision duplicate from being uploaded.
In order to make it more general, we could:
- Add a flag that can be passed as an argument to WikidataItem.add_statement() โ then it would apply to any datetime statement, not just birth/death. It would also prevent it from applying to all birth/death dates by default.
- Test it on timestamps that include months โ i.e. is YYYYMM recognized as a duplicate of YYYYMMDD? Can't tell from the top of my head.