Add 2 times together JavaScript

前端 未结 4 1691
轮回少年
轮回少年 2020-12-21 12:39

Looking to add time together within javascript.

I have never written any javascript, and as such am struggling with the way to progress.

I have got to add

4条回答
  •  盖世英雄少女心
    2020-12-21 13:08

    Take a look at moment.js - an excellent library for managing all kinds of time related functionality - momentjs.com

    Later addition to answer:

    You mention your are a newbie with JavaScript so here is a simple working example of your problem using moment.js - this example assumes the file and moment.js are in the same folder. Check out the docs on the moment.js for all the formatting options. Good luck.

    
    
    
    
    Add Time
    
    
    
    
    
       
    
    
    

提交回复
热议问题