another js fix for date formatting