Effect CommunityEC
Effect Community2y ago
5 replies
j5004

Transforming Custom Date Strings with @effect/schema for API Validation

Hi! How would you transform a custom date string with @effect/schema. I was considering DateFromString, but I cannot see a way to use a custom format (in my case, ddMMyyyy). Basically, I want to validate an API call which returns {"name": "Julien", "birthday": "02021990"} in JSON format and get an object {name: "Julien", birthday: Date(1990, 2, 2)}. Thank you in advance for the help!
Was this page helpful?