javascript toLocaleDateString short code example
Example 1: mktime in js
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
Example 2: ~~ in javascript
~~ used to convert some types to int (32 bit int)
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
~~ used to convert some types to int (32 bit int)