what date (). Is there any way to use the getTime () function without getting time in millimeters? If there is no option for gate time, will I be given only accuracy in minutes?
Apart from this, I am not sure how to strip milliseconds from the soil object.
var time = new date (). GetTime () Output: 1426515375925
simple math if you want to assume in seconds Divide the result of 1000 to milliseconds:
var seconds = new date (). GetTime () / 1000;
To delete any decimal you may want to call Math.floor ()
:
var seconds = Math .floor (new date). GetTime () / 1000); Is there any other function that I can use only 1/1/1970 for me, I do not want to count the number as accurately. Surely, divide the seconds by 60 or divide the millisecond by 60000:
var min = Math.flur (new date). GetTime () / 60000);
var milliseconds = 1426515375,925, seconds = monastery. Floor (milliseconds / 1000), // 1426515375 min = monastery. Floor (millisecond / 60000); // 23775256
No comments:
Post a Comment