Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Method that creates a Data from a Unix Timestamp
- */
- function unixTimestampToDate(unix_timestamp) {
- return new Date(unix_timestamp * 1000);
- }
- /**
- * Method that convert Date to Unixtimestamp.
- */
- function dateToUnixTimestamp(date) {
- return date.getTime() / 1000;
- }
Add Comment
Please, Sign In to add comment