Add date pattern
Add boolean flag for -p to fix issue under Windows