Fix parseDate and formatDate (#209)