javascript - finding next monday from a fixed date using momentjs -
javascript - finding next monday from a fixed date using momentjs -
code:
var startdate = moment("10/3/2014"); var nf = moment(startdate).day("monday") alert(nf);
i trying find next mon "10/3/2014", should "10/6/2014".
but output "mon sep 29 2014 00:00:00 gmt+0530".
it returning previous monday.
my code may wrong. expecting should homecoming me next mon date i.e "10/6/2014".
you can see code here.very simple
$('#next').text(moment(startdate).day(1+7));
javascript momentjs
Comments
Post a Comment