Adjust Pivot column order?

I have a pivot table for which I am displaying columns by Year then by Month. Unfortunately, the month columns are not appearing in a naturally sorted order. They seem to be appearing in the order they appear within the data.

Is there a way to force the columns to appear in numerical order? Or, do I need to pre-sort the data by Year, then Month?

It took a few days, but I found partial solutions in two separate examples and cobbled together a method that gets my columns to sort numerically, as required.

Here is a snippet with my solution, in case others can benefit from it.