automatic updating dates on mini sites??

2 replies
Hi everybody

just a quick question:

I have seen many mini sites displaying something like for ex:

From: The Desk of Mr Smith
Date: May, 09 2010

where the date automatically updates to the current date

can anybody tell me how this is done?

Thanks in advance!
#automatic #dates #mini #sites #updating
  • Profile picture of the author HDRider
    Insert this Java Script where you want it to display in your html code

    <script language="JavaScript">
    <!--
    var now = new Date();
    var days = new Array(
    'Sunday','Monday','Tuesday',
    'Wednesday','Thursday','Friday','Saturday');
    var months = new Array(
    'January','February','March','April','May',
    'June','July','August','September','October',
    'November','December');
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
    function fourdigits(number) {
    return (number < 1000) ? number + 1900 : number;}
    today = days[now.getDay()] + ", " +
    months[now.getMonth()] + " " +
    date + ", " +
    (fourdigits(now.getYear()));

    document.write(today);
    //-->
    </script>
    Signature

    ~ Ultra Fast Product Creation - Creating your own products is where the real money is... Let me show you how in this step by step guide.

    ~ Get Your Mind Right and Everything Else is Easy! Law of Attraction States...You Attract What You Think About.

    {{ DiscussionBoard.errors[2078601].message }}
    • Profile picture of the author TheGraduate
      Originally Posted by HDRider View Post

      Insert this Java Script where you want it to display in your html code

      <script language="JavaScript">
      <!--
      var now = new Date();
      var days = new Array(
      'Sunday','Monday','Tuesday',
      'Wednesday','Thursday','Friday','Saturday');
      var months = new Array(
      'January','February','March','April','May',
      'June','July','August','September','October',
      'November','December');
      var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
      function fourdigits(number) {
      return (number < 1000) ? number + 1900 : number;}
      today = days[now.getDay()] + ", " +
      months[now.getMonth()] + " " +
      date + ", " +
      (fourdigits(now.getYear()));

      document.write(today);
      //-->
      </script>
      Thanks a lot
      Signature
      amazing product coming soon!
      {{ DiscussionBoard.errors[2078652].message }}

Trending Topics