past month calculations