The getDays method attempts to access array elements using a passed in month argument as an index. The problem is month can be larger than 12 because the regex defined in SlashDMY matches on dates in a mm/dd/yyyy format. So this means a date like 1/30/2023 will cause a panic.