js cast time as Number