How to merge 2 date fields
This isn't a direct answer to your question, but is probably the best option to move forward.

Drupal 8.2.0 (due 2016/10/05) will include the new datetime_range module, which provides date ranges in a single field.

I would wait until this is available, and then migrate your two datetime fields into a single daterange fields (one to the start value and the other to the end value).

Then, I would make a custom formatter for daterange fields that implements your logic to combine month/year when they are the same for start and end.

You can then configure your various vide modes to use this new formatter.