Automatically populate a hierarchical taxonomy from a custom field

IF it were me, I would make “Year” and “Month” separate taxonomies rather than using a hierarchical taxonomy. If you do it that way, here’s a good answer to use as a reference. This will solve the “unique slug” issues you’ll run into using hierarchical taxonomies.