fix bug first day or last day of the month on Sunday

For example, 2014/6 2014/8