ucsd-ccbb / qiimp

Web application to collect metadata specifications from an experimenter and produce metadata input files with appropriate constraints
3 stars 7 forks source link

Date comparison formula incorrectly passes invalid dates for some exclusive comparisons #168

Closed AmandaBirmingham closed 5 years ago

AmandaBirmingham commented 5 years ago

Here, 2008 should NOT be a valid date (as the maximum is exclusive: only values LESS than 2008 are acceptable):

screen shot 2018-09-10 at 12 09 33 am

However, the logic in the comparison is incorrect for exclusive comparisons (although correct for inclusive ones):

 #  if year in input equals year in limit
 #      if month doesn't exist in input
 #          pass (give user the benefit of the doubt)