Fix off-by bug in period: "latest N days"