Fix example templates month error.

The example templates that use monthly data could show the previous
month if "day end hour" was set to between noon and midnight. A simple
calculation prevents that from happening.