Add optional date selection to parse function