Format time stamp - Node.js Date

Node.js examples for Date:Time Format

Description

Format time stamp

Demo Code

  /**/*w w  w. j a va2s  . co  m*/
   * Format time stamp,
   * 
   * @param tim:
   *            time stamp
   * @param dat:
   *            the date format
   */
  timeToDate : function(tim, dat) {
    return new Date(parseInt(tim) * 1000).format(dat);
  },

Related Tutorials