Countdown to 1st of each month Javascript (refresh each month) -
i'm trying implement countdown script countdowns first day of next calendar month. far, can find scripts countdown absolute date.
i looked through every scripts of this site , none meet requirements.
does know of script this? using regular countdown @ moment have edit new date on 1st of every month. i'd have automatically adjusting 1 instead.
function tilthefirst(){ var d=new date(), f=new date(d); f.setmonth(f.getmonth()+1,1); f.sethours(0,0,0,0); return f-d; }
create new date current moment.
create new date first moment of first of next month.
return difference
Comments
Post a Comment