optimize firstOfMonth