dotnet-websharper / core

WebSharper - Full-stack, functional, reactive web apps and microservices in F# and C#
https://websharper.com
Apache License 2.0
594 stars 52 forks source link

JavaScript dates aren't comparible #386

Open spiffytech opened 9 years ago

spiffytech commented 9 years ago

JavaScript Date objects don't implement the IComparable interface, so I have to convert them to Unix timestamps to compare them. It would be nice if they could be compared directly.

qwe2 commented 9 years ago

I don't think it's currently possible to make JavaScript types defined by WIG implement .NET interfaces. You can, however, use System.DateTime (for which a proxy is defined) for a richer interface over Date objects if it's plausible in your case.