For future DATES.JS decription - copied from local date management as a prototype Tagline Dated List (Internet JavaScript at Davar Web Site)
Go to:  Site entry | Site contents | Site index | Internet | JavaScript | Text bottom

Tagline  Dated  List  JavaScript

TAGLINES script (embedded into HTML) generates colors for modification dates in the list of classified tagline sections.  Colors are chosen in such a way that brighter colors correspond to more recently modified items:

            Fuchsia  – Modified within last    week.
Red – Modified within last    month.
Brown – Modified within last 3 months.
Black – Modified beyond last 3 months.

To make script simple and quick it is assumed that any year contains 365 days and any month contains 30 days.  This might cause a slight imprecision on the border lines, but it's not important here, since colors serve only to hilight the most recent changes and date is present anyway.

Script is faily simple: date and color arrays are declared and date array gets initiated by last modification dates for corresponding sections (when something is changed in the section, current date should be entered into this script).  Day number of script execution is evaluated and is compared with each of the dates in the array.  Date difference drives the choice of color to be saved in the color array.  In the body of HTML saved color is used as the color attribute of the corresponding day.



<!-- Tagline Selection              01/08/1998–08/15/2001 -->
<!-- ----------------------------------------- 05/25/1999 -->
<!-- www.davar.net/MISCL/TAGLINES/TAGLINES.HTM            -->
<!-- Copyright (C) 1998–2000 by Vladimir Veytsel          -->

<HTML>
<HEAD>
  <TITLE>Tagline Selection (Miscellaneous at Davar Web Site)</TITLE>
  <META HTTP-EQUIV="Content-Type" CONTENT="Text/HTML; CharSet=ISO-8859-1">
  <META NAME      = Description
        CONTENT   ="Page: Tagline Selection.
                    Site: Davar Web Site,
                          Computer Science, Programming, Mainframe, UNIX, PC, Internet,
                          Mathematics, Go, Zen, Quotations, Extracts, Humor, Russian.">
  <META NAME      = Keywords
        CONTENT   ="Davar Web Site, Tagline, Taglines">
  <META   NAME    = Author CONTENT="Vladimir Veytsel">
</HEAD>

<NOSCRIPT>
  <BODY BACKGROUND="../../PAPER010.JPG" BGCOLOR=White TEXT=Black LINK=Blue ALINK=Fuchsia VLINK=Purple>
</NOSCRIPT>
<SCRIPT LANGUAGE=JavaScript>
  <!--
    if (sessionStorage.getItem("BG")=="On")
       {N=Math.floor(Math.random()*9)%9+1
    document.write("<BODY BACKGROUND='../../PAPER0",N,"0.JPG' BGCOLOR=White TEXT=Black LINK=Blue ALINK=Fuchsia VLINK=Purple>")

    DT = new Array(9)   // Date  array (dynamically sized; starts from "0" - not used)
    CT = new Array(9)   // Color array (dynamically sized; starts from "0" - not used)

    DT[1]="05/24/1999"  // Random
    DT[2]="03/06/1998"  // Wisdom
    DT[3]="03/06/1998"  // Humor
    DT[4]="03/06/1998"  // Computer
    DT[5]="03/06/1998"  // Corporate
    DT[6]="03/06/1998"  // Political
    DT[7]="06/15/1998"  // Adult
    DT[8]="03/06/1998"  // General

    Today   =new Date()
    Cur_Date=365*Today.getFullYear()+30*(Today.getMonth()+1)+Today.getDate()

    for (i=1;i<DT.length;i++)
        {Month=Number(DT[i].substr(0,2))
         Day  =Number(DT[i].substr(3,2))
         Year =Number(DT[i].substr(6))
         Mod_Date=365*Year+30*Month+Day
         Diff=Cur_Date-Mod_Date
         CT[i]="Black"           // Modified beyond last 3 months
         if (Diff<=90)
            CT[i]="Brown"        // Modified during last 3 months
         if (Diff<=30)
            CT[i]="Red"          // Modified during last   month
         if (Diff<=7)
            CT[i]="Fuchsia"      // Modified during last   week
        }
  //-->
</SCRIPT>

<!-- Page: Tagline Selection.
     Site: Davar Web Site,
           Computer Science, Programming, Mainframe, UNIX, PC, Internet,
           Mathematics, Go, Zen, Quotations, Extracts, Humor, Russian. -->

<FONT FACE="Times New Roman" SIZE=3>
    
  <FONT SIZE=5 COLOR=Red><B><I><U>Tagline  Selection</U></I></B></FONT>
  <BR> 
  <TABLE>
    <TR>
      <TD> </TD>
      <TD><B><A HREF="RANDTAGL.HTM">Random</A></B></TD>
      <TD> </TD>
      <TD><FONT SIZE='-1'><I>04/21/1998
        <NOSCRIPT>– 1999</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[1],">",DT[1],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD> </TD>
      <TD><I>Random tagline samples</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="WISDOM.HTM">Wisdom</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/03/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[2],">",DT[2],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"Doing it the hard way is always easier."</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="HUMOR.HTM">Humor</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>12/21/1997
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[3],">",DT[3],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"Just a possum on the information superhighway..."</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="COMPUTER.HTM">Computer</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/03/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[4],">",DT[4],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"Become a programmer and never see the world!"</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="CORPORAT.HTM">Corporate</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/03/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[5],">",DT[5],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"The scenery only changes for the lead dog."</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="POLITICS.HTM">Political</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/04/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[6],">",DT[6],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"An honest politician: One who stays bought."</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="ADULT.HTM">Adult</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/05/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[7],">",DT[7],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"A man without a woman is like a neck without pain."</I></TD>
    </TR>
    <TR>
      <TD></TD>
      <TD><B><A HREF="GENERAL.HTM">General</A></B></TD>
      <TD></TD>
      <TD><FONT SIZE='-1'><I>03/05/1998
        <NOSCRIPT>– 1998</FONT></I></NOSCRIPT>
        <SCRIPT LANGUAGE=JavaScript>
          <!--
            document.write("– <FONT COLOR=",CT[8],">",DT[8],"</FONT></FONT></I>")
          //-->
        </SCRIPT>
      </TD>
      <TD></TD>
      <TD><I>"Evolution stops when stupidity is no longer fatal."</I></TD>
    </TR>
  </TABLE>
  <I>
    <BR>  
    <FONT COLOR=Green>Go to</FONT> <A HREF="../../index.htm">Davar site entry</A>
       
    <FONT COLOR=Green>Go to</FONT> <A HREF="../../CNT.HTM">Site contents</A>
       
    <FONT COLOR=Green>Go to</FONT> <A HREF="../../IND.HTM">Site index</A>
       
    <FONT COLOR=Green>Go to</FONT> <A HREF="../MISCL.HTM">Miscellaneous</A>
  </I>
</FONT>
</BODY>
</HTML>
  

View Tagline Dated List   (Use [Back] button or [Alt]+[CL] to return here)
View [and save] DATES.JS text   (Use [Back] button or [Alt]+[CL] to return here)
To make text executable rename it to *.HTM and
make a global change of "&lt;" into "<" signs and "&amp;" into "&" signs.
Go to:  Site entry | Site contents | Site index | Internet | JavaScript | Text top