Skip to content

Instantly share code, notes, and snippets.

@twelvejie
Created April 29, 2024 09:28
Show Gist options
  • Save twelvejie/6f4b22588031770c7f95f623a0e7471b to your computer and use it in GitHub Desktop.
Save twelvejie/6f4b22588031770c7f95f623a0e7471b to your computer and use it in GitHub Desktop.

js时间戳转时间

var bind_time = 1713769412106
var d  = new Date(bind_time)

dformat = [d.getMonth()+1,
               d.getDate(),
               d.getFullYear()].join('/')+' '+
              [d.getHours(),
               d.getMinutes(),
               d.getSeconds()].join(':');
console.log(dformat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment