Converting Code from Zod to Effect/Schema: Equivalent of `z.transform()` Function
Hey all
I'm trying to convert some code from zod to effect/schema. I'm stuck on an equivalent of the
I've had to specify the tz manually as the source doesn't use a proper date time string.
I'm a bit lost as to how I should do this as I can't figure out how to declare a
is there a better way?
I'm trying to convert some code from zod to effect/schema. I'm stuck on an equivalent of the
z.transform() function. Basically I've got a string field that I'd like to convert to a luxon DateTime that I've been doing with z.string().transform(date => DateTime.fromISO(date, { zone: "Pacific/Auckland" }))I've had to specify the tz manually as the source doesn't use a proper date time string.
I'm a bit lost as to how I should do this as I can't figure out how to declare a
Schema<string, DateTime>. I've faffed around and come up with this, but it feels like a lot to just do what was a one liner transformationis there a better way?
