Get Date H;m string - Node.js Date

Node.js examples for Date:Date Format

Description

Get Date H;m string

Demo Code


  /**/*from  www .ja  v  a 2s . c  om*/
   * Get H;m string
   */
  getHoursMins: function(){
    return new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1").substr(0, 5);
  },

Related Tutorials