kaleidawave / prism

(No longer in development). Experimental compiler for building isomorphic web applications with web components.
MIT License
110 stars 1 forks source link

Use chrono for Date with Rust SSR #26

Closed kaleidawave closed 3 years ago

kaleidawave commented 3 years ago

If a component has a Date property then import the chrono module and use chrono::DateTime for properties of type Date. chrono::DateTime::to_string seems to return a string which can be successfully parsed by the JS Date constructor so hydration of the raw output should work just fine.