%dw 2.0
output application/json
var someDates = [
"Jun 11, 2018",
"Sep 11, 2017",
"Jul 11, 2018",
"Sep 21, 2017",
"2018-01-20T00:00:00",
"2018-01-25T00:00:00",
"2018-01-20T00:00:00",
"2018/07/11",
"2018/08/11"
]
type Scientific = String {format: "yyyy-MM-dd"}
type USDate = String {format: "MMM dd, yyyy"}
type WorldDate = String {format: "dd-MM-yyyy"}
type Chosen = WorldDate
fun normalizeDate (d: String) = d
---
someDates map normalizeDate($)
Comments