Second Saturday of the month by using getDay()

For the present Month Second Saturday is here .



Here is the code

HTML

<div id=display></div>
<div id=display2></div>

JQuery

<script>
var date= new Date();
var firstDay = new Date(date.getFullYear(), date.getMonth(), 1);
date.setDate(14-firstDay.getDay());
document.getElementById('display').innerHTML=date
// DD/MM/YYYY format 
var str=date.getDate() +'/'+(date.getMonth()+1)+'/'+date.getFullYear()
document.getElementById('display2').innerHTML=str
</script>

Getting date of the month from date object
Date Reference All Date Projects
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here




    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer