extending this in js code example
Example 1: mktime in js
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
Example 2: ~~ in javascript
~~'-1' = -1
~~true = 1
~~false = 0
~~5.6 = 5
var seconds = new Date(year, month, day, hours, minutes, seconds, 0).getTime() / 1000;
~~'-1' = -1
~~true = 1
~~false = 0
~~5.6 = 5