All this hard-coded "%Y-%m-%d" makes me nervous. Make it a variable once and reuse.