Treatments of afterPeriod and beforePeriod are mixed up in TimeRangeCore implementation - SDMXRI-1534 - NSI 8.2.0
There seems to be one bug in SdmxSource library: in an allowed constraint it is not mandatory to define both start and end of a time range when restricting the time dimension. For such cases the AfterPeriod and the BeforePeriod elements could be used.
As per the related schema in SDMX standard:
- AfterPeriod means a period value is valid if it comes after the period given here, thus it is to be interpreted as a staring point in time.
- BeforePeriod means a period value is valid if it comes before the period given here, thus it is to be interpreted as a end point in time.
It seems that SdmxSource implementation does this vice-versa:
- value of AfterPeriod is mapped to the end date https://citnet.tech.ec.europa.eu/CITnet/stash/projects/SDMXRI/repos/sdmxsource.net/browse/SdmxObjects/Model/Objects/Base/TimeRangeCore.cs#122
- value of BeforePeriod is mapped to the start date https://citnet.tech.ec.europa.eu/CITnet/stash/projects/SDMXRI/repos/sdmxsource.net/browse/SdmxObjects/Model/Objects/Base/TimeRangeCore.cs#131
Related JIRA ticket at ESTAT: https://citnet.tech.ec.europa.eu/CITnet/jira/browse/SDMXRI-1534
Edited by Jens Dossé