• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

Date Difference in Days

May 17th, 2005 by Intermanaut

To use this, just call CountDays() with two properly formatted date values.

<script type=”text/javascript”>

<!–

function CountDays(StartDate,EndDate)

{

var StartMS=Date.parse(new Date(StartDate));

var DateMS=Date.parse((EndDate));

return parseInt(DateMS-StartMS)/86400000;

}

var StartDate=’May 01, 2001 00:00:00′;

var EndDate=’May 17, 2001 00:00:00′;

document.write (CountDays(StartDate,EndDate));

//–>

</script>

Posted in JavaScript | No Comments

Comments are closed.

  • Recent Posts

    • Kids & Boredom
    • Robin Hood
    • Why should Facebook be responsible for what your kids do on-line?
    • Hot Tub Time Machine
    • Data Back-up and The Cloud
  • Things

    • About
    • Addresses worth banning from your forum
    • Downloadables
    • Foamcore Macro Studio
    • Multiplicity: Pouring yourself a beer
    • Multiplicity: The five of me
    • Ross on Wye: What a Mess
    • Weightloss for Recessive Times
  • Stuff

    • Conversations (22)
    • Movies (15)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (262)
      • Angry (47)
      • Happy (21)
    • Blogroll

      • 1 city, 2 people, 24 hours
      • del.icio.us
      • EmmieJay - guilt-free style
      • flickr

Kibo … © 2010 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook