I know I can do anything and some more envolving Dates with momentjs. But embarrassingly, I'm having a hard time trying to do something that seems simple: geting the difference between 2 times.  Example:  var now  = "04/09/2013 15:00:00"...
I'm able to get the difference between two dates using MomentJs as follows:  moment(end.diff(startTime)).format("m[m] s[s]")   However, I also want to display the hour when applicable (only when >= 60 minutes have passed).  However,...
Does anyone know how to convert JS dateTime to MySQL datetime? Also is there a way to add a specific number of minutes to JS datetime and then pass it to MySQL datetime?...
Hello is there anyway you can stop moment.js from loading all the locales(I just need english) when your using webpack? I'm looking at the source it seems that if hasModule is defined which  it is for webpack then it always tries to require() e...
I have a date object that's created by the user, with the timezone filled in by the browser, like so:  var date = new Date(2011, 05, 07, 04, 0, 0); > Tue Jun 07 2011 04:00:00 GMT+1000 (E. Australia Standard Time)   When I stringify it, thoug...
I'm trying to detect with Moment.js if a given date is between two dates. Since version 2.0.0, Tim added isBefore() and isAfter() for date comparison.  Since there's no isBetween() method, I thought this would work:  var date = moment("...
I want to parse the following string with moment.js 2014-02-27T10:00:00 and output day month year (14 march 2014) I have been reading the docs but without success http://momentjs.com/docs/#/parsing/now/...
Angular material introduced a new date picker component found here.  I want the date returned by this component to be in the format yyy-mm-dd but I am not sure how is this done. By searching I found that $mdDateLocaleProvider can be used, but I cou...
I have a problem that requires me to take two times in 12 hour format and compare them, we have moment.js included in our project and we initially thought it would be as trivial as this:  var beginningTime = moment('8:45am'); var endTime =...
Using moment.js (with moment-timezone), I want to get the timezone abbreviation (e.g. PST) for the current locale.  var now = Date.now(); // 1423254073931 var zone = moment(now).zone(); // 480 var timezone =    How do I get the timezone abbreviatio...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.