Create new YearMonth's year and month with valid value
year
month
const YearMonth(this.year, this.month) : assert(month >= 1 && month <= 12);