function NextMonth1() { var now = new Date(); if (now.getMonth() == 11) { return new Date(now.getFullYear() + 1, 0, 1); } else { return new Date(now.getFullYear(), now.getMonth() + 1, 1); } } function formatDate(date) { var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ]; var day = date.getDate(); var monthIndex = date.getMonth(); var year = date.getFullYear(); return day + ' ' + monthNames[monthIndex] + ' ' + year; } var div = document.getElementById('couponText'); div.innerHTML += "Effective till " + formatDate(NextMonth1());
Monday
javascript next month date formatting coupon source code
Subscribe to:
Posts (Atom)
imagemagic add text to image
rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...
-
Error:The element 'Schedule' has invalid child element 'RecurrenceRule'. List of possible elements expected: 'Occurring&...
-
Perfect blog post must include following elements (from 1 to 13): 1.Big catchy header in 30px font size 2.First copy of social links and com...
-
SetKeyDelay , 75 , 75 ;Exits AutoHotKey application. $^CapsLock:: ExitApp return ;Pauses AutoHotKey Script. F6:: Pause , Toggle, 1 $x:: ...