t/32>>0 and (t/32)|0 both only works on 32-bit integers. The problem here is that Date.Now() return type is defined as int in WebSharper.JavaScript binding, but in reality it is now bigger than 32-bit. Still it's simpler not to change it now as it is a breaking change, and is safe to use when you do not do divide it.

One solution: use As cast (which does nothing in JS transation) to int64 or float:

1
2
let t = Date.Now() |> As<int64>
let x = t/32L
By on 10/19/2015 3:43 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper