calculate time difference between two date in HH:MM:SS javascript
问题 I have created one timer application in javascript. Firstly it takes the current UTC date to init timer with some reference. here's the code on_timer: function(e) { var self = this; if ($(e.target).hasClass("pt_timer_start")) { var current_date = this.get_current_UTCDate(); this.project_timesheet_db.set_current_timer_activity({date: current_date}); this.start_interval(); this.initialize_timer(); this.$el.find(".pt_timer_start,.pt_timer_stop").toggleClass("o_hidden"); Now, Once timer is