[ADDED] Added setMaxValue and setMinValue methods to allow to set them programmatically.
It is a bit hard to manage with the boundaries and the logic. For me this works fine, but you need to set proper values from the beginning (I tried to reuse your checks related with possible values). This can be a bit pain in the ass for some algorithms that people can use in their code, but nothing dramatic.
Tested using the following data:
StartingMinValue = 2016 (my logic)
StartingMaxValue = 2017 (my logic)
[ADDED] Added setMaxValue and setMinValue methods to allow to set them programmatically.
It is a bit hard to manage with the boundaries and the logic. For me this works fine, but you need to set proper values from the beginning (I tried to reuse your checks related with possible values). This can be a bit pain in the ass for some algorithms that people can use in their code, but nothing dramatic.
Tested using the following data: StartingMinValue = 2016 (my logic) StartingMaxValue = 2017 (my logic)
setMinValue(2015) -> works. setMinValue(2014) -> works. setMaxValue(2018) -> works. setMaxValue(2019) -> works.