Get help. Give help. A Web Design and Development Community.

Will anyone be kind enough to explain this code to me?

  • # November 20, 2012 at 4:16 am


    I have a Javascript script here which i cant really make much sense off. Would anyone be kind enough to explain to me?

    Your help is greatly appreciated!

    function daysTilDate(expiredate){

    expiredate = expiredate.substr(6,4)+”, “+expiredate.substr(3,2)+”, “+(expiredate.substr(0,2));

    var thisDay=new Date(expiredate);

    var CurrentDate = new Date();

    var thisYear=CurrentDate.getFullYear();


    var DayCount=(thisDay-CurrentDate)/(1000*60*60*24);


    return DayCount;

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

We have a pretty good* newsletter.