• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

List Last x Days

May 17th, 2005 by Intermanaut

To show the dates for Today – x days, set the value of x accordingly.

<script type=”text/javascript”>

<!–

DateToday = new Date();

x=7;

for (y=0; y<x; y++)

{

MyDate = new Date(Date.UTC(parseInt( _

DateToday.getYear()), _

parseInt(DateToday.getMonth()), _

parseInt(DateToday.getDate()))- _

(60*60*24*1000*y));

MyDateString=MyDate.getDate() + ‘.’ _

+ parseInt(MyDate.getMonth()+1) _

+ ‘.’ + MyDate.getYear();

document.write (MyDateString + “<br>”);

}

//–>

</script>

Posted in JavaScript | No Comments

Comments are closed.

  • Recent Posts

    • Motorola MotoActv Review
    • Exceptionally Poor Grammar
    • The Adjustment Bureau
    • Unkown
    • Paul
  • 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 (21)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (265)
      • Angry (48)
      • Happy (21)
    • Blogroll

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

Kibo … © 2012 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook