fix ranges for MONTH_OF_YEAR
constants for value ranges
simplified ternary expressions