Fix function example to generate end of month