USGS InfoBank banner.  USGS, Coastal and Marine Geology, InfoBank banner.
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- specialdates2html Skip navigational links
    ________   ________   ______________   ________   _________   _______________   ________  
  tab edge  Home  tab edge  Data  tab edge  Activities  tab edge  FACS  tab edge  Atlas  tab edge  Definitions  tab edge  More  tab edge  
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs   Boothill  
   
Expanded description
Topic Description
Name
dates2html
Synopsis
/infobank/programs/html/dates2html/special/specialdates2html.for
Description
  Program to generate list of days for an activity.
    
Author
  Clint Steele        7/26/01


    
Opens
 open (unit = 91,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'unknown',
*      file = '/tmp/dates2html_days.temp')

 open (unit = 92,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'old',
*      file = '/tmp/dates2html_sorted.temp')

         open (unit = 94,             ! header
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part1.temp')

         open (unit = 95,             ! left column table
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part2.temp')

         open (unit = 96,             ! middle column table
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part3.temp')

         open (unit = 97,              ! right column table
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part4.temp')

         open (unit = 98,              ! footer
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part5.temp')

 open (unit = 90,
*      status = 'old',
*      access = 'sequential',
*      form = 'formatted',
*      name = '/tmp/dates2html_htmllist.temp')

 open (unit = 91,
*      status = 'unknown',
*      access = 'sequential',
*      form = 'formatted',
*      name = 
*  '/infobank/programs/html/dates2html/dates.html')

    
Reads
     read (90, '(a7,t10,i2,1x,i2,1x,i2,
*                t23,i3,
*                t32,i2,1x,i2,1x,i2,
*                t45,i3)', end = 99)
*        ID, 
*        StartMonth, StartDay, StartYear,
*        StartJDay, 
*        EndMonth, EndDay, EndYear,
*        EndJDay

     read (92, '(i4.4,1x,i2.2,1x,i2.2,1x,i3.3,1x,
*                i4.4,1x,i2.2,1x,i2.2,1x,i3.3,1x,q,a)',
*                end = 999)
*                StartYear,
*                StartMonth, 
*                StartDay,
*                StartJDay,
*                EndYear,
*                EndMonth, 
*                EndDay,
*                EndJDay,
*                IDLength,
*                ID(1:IDLength)

 read (90, '(t36,i4)', end = 99) FirstYear
     read (90, '(t36,i4)', end = 99) LastYear
    
Writes
         write (91, '(i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,
*                     i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,a)')
*                StartYear+StartCentury,  
*                StartMonth, '/', 
*                StartDay, 
*                StartJDay,
*                EndYear+EndCentury,
*                EndMonth, '/',
*                EndDay,
*                EndJDay,
*                ID(1:IDLength)
         write (91, '(i4.4,1x,a,1x,
*                     i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,a)')
*                EndYear+EndCentury,
*                '01/01 001', 
*                EndYear+EndCentury,
*                EndMonth, '/',
*                EndDay,
*                EndJDay,
*                ID(1:IDLength)

         write (91, '(i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,
*                     i4.4,1x,a,1x,i3.3,1x,a)')
*                StartYear+StartCentury,  
*                StartMonth, '/', 
*                StartDay, 
*                StartJDay,
*                StartYear+StartCentury,  
*                '12/31',
*                YearLength,
*                ID(1:IDLength)
             write (95, '(a)')
*                '      </TABLE>'
             write (95, '(a)')
*                '    </TD>'

             write (96, '(a)')
*                '      </TABLE>'
             write (96, '(a)')
*                '    </TD>'

             write (97, '(a)')
*                '      </TABLE>'

         write (OutDate, '(i4.4)') CurrentYear
         write (95, '(a)')
*        '    <TD>'
         write (95, '(a)') 
*        '      <TABLE BORDER="0" WIDTH="80">'

         write (96, '(a)')
*        '    <TD>'
         write (96, '(a,i3.3,a)') 
*        '      <TABLE BORDER="0" WIDTH=',YearLength,'>'

         write (97, '(a)')
*        '    <TD>'
         write (97, '(a)') 
*        '      <TABLE BORDER="0" WIDTH="90">'

     write (HyphenID, '(10x)')
     write (Link, '(512x)')
     write (Link, '(a)')
*        '<A HREF="http://walrus.wr.usgs.gov'//
*        '/infobank/'//
*        ID(1:1)//
*        '/'//
*        ID(1:IDLength)//
*        '/html/'//
*        HyphenID(1:IDLength+3)//
*        '.meta.html">'

     write (95, '(a)')
*        '        <TR>'
     write (95, '(a)')
*        '          <TD>'
     write (95, '(a)')
*        '            <TABLE BORDER="1">'
     write (95, '(a)')
*        '              <TR>'
     write (95, '(a)')
*        '                <TD WIDTH="80" ALIGN="CENTER">'//
*        Link(1:LinkLength)//
*        HyphenID(1:IDLength+3)//'</A></TD>'
     write (95, '(a)')
*        '              </TR>'
     write (95, '(a)')
*        '            </TABLE>'
     write (95, '(a)')
*        '          </TD>'
     write (95, '(a)')
*        '        </TR>'

     write (96, '(a)')
*        '        <TR>'
     write (96, '(a)')
*        '          <TD>'
     write (96, '(a,i3.3,a)')
*        '            <TABLE BORDER="1" WIDTH=',YearLength,'>'
     write (96, '(a)')
*        '              <TR>'

         write (96, '(a,i,a)')
*            '                <TD WIDTH="',
*            int(Percent1+0.5),
*           '%"> </TD>'
     write (96, '(a,i,a)')
*        '                <TD WIDTH="',
*        int(Percent2+0.5),
*        '%" BGCOLOR="00FFFF">'//
*        ' </TD>'

         write (96, '(a,i,a)')
*            '                <TD WIDTH="',
*            int(Percent3+0.5),
*            '%"> </TD>'
     write (96, '(a)')
*        '              </TR>'
     write (96, '(a)')
*        '            </TABLE>'
     write (96, '(a)')
*        '          </TD>'
     write (96, '(a)')
*        '        </TR>'

     write (97, '(a)')
*        '        <TR>'
     write (97, '(a)')
*        '          <TD>'
     write (97, '(a)')
*        '            <TABLE BORDER="1">'
     write (97, '(a)')
*        '              <TR>'
     write (97, '(a,i2.2,a,i2.2,a,i2.2,a,i2.2,a)')
*        '                <TD WIDTH="90" '//
*        'BGCOLOR="CCFFFF" ALIGN="CENTER">',
*        StartMonth,'/',StartDay,'-',
*        EndMonth,'/',EndDay,
*        '</TD>'
     write (97, '(a)')
*        '              </TR>'
     write (97, '(a)')
*        '            </TABLE>'
     write (97, '(a)')
*        '          </TD>'
     write (97, '(a)')
*        '        </TR>'

 write (95, '(a)')
*                '</TABLE>'
 write (96, '(a)')
*                '</TABLE>'
 write (97, '(a)')
*                '</TABLE>'

 write (98, '(a)')
*                '  </TR>'
 write (98, '(a)')
*                '</TABLE>'

 write (95, '(a)')
*           '        <TR>'
 write (95, '(a)')
*           '          <TD>'
 write (95, '(a)')
*           '            <TABLE BORDER="1">'
 write (95, '(a)')
*           '              <TR>'
 write (95, '(a,i4.4,a)')
*           '                <TD WIDTH="80" '//
*           'BGCOLOR="CCFFFF" ALIGN="CENTER">',
*           CurrentYear,
*           '</TD>'
 write (95, '(a)')
*           '              </TR>'
 write (95, '(a)')
*           '            </TABLE>'
 write (95, '(a)')
*           '          </TD>'
 write (95, '(a)')
*           '        </TR>'

 write (96, '(a)')
*           '        <TR BGCOLOR="CCFFFF">'
 write (96, '(a)')
*           '          <TD>'
 write (96, '(a)')
*           '            <TABLE BORDER="1">'
 write (96, '(a)')
*           '              <TR>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">J</TD>'
 write (96, '(a,i2.2,a)')
*           '                <TD WIDTH="',
*           YearLength - 337,
*           '" ALIGN="CENTER">F</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">M</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="30" '//
*           'ALIGN="CENTER">A</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">M</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="30" '//
*           'ALIGN="CENTER">J</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">J</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">A</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">S</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">O</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="30" '//
*           'ALIGN="CENTER">N</TD>'
 write (96, '(a)')
*           '                <TD WIDTH="31" '//
*           'ALIGN="CENTER">D</TD>'
 write (96, '(a)')
*           '              </TR>'
 write (96, '(a)')
*           '            </TABLE>'
 write (96, '(a)')
*           '          </TD>'
 write (96, '(a)')
*           '        </TR>'

 write (97, '(a)')
*           '        <TR>'
 write (97, '(a)')
*           '          <TD>'
 write (97, '(a)')
*           '            <TABLE BORDER="1">'
 write (97, '(a)')
*           '              <TR BGCOLOR="CCFFFF">'
 write (97, '(a)')
*           '                <TD WIDTH="90" ALIGN="CENTER">'//
*           '<A HREF="http://walrus.wr.usgs.gov/infobank/'//
*           'programs/html/dates2html/dates.html">'//
*           'Dates</A></TD>'
 write (97, '(a)')
*           '              </TR>'
 write (97, '(a)')
*           '            </TABLE>'
 write (97, '(a)')
*           '          </TD>'
 write (97, '(a)')
*           '        </TR>'
 write (91, '(a)')
*    '<CENTER><A HREF="http://walrus.wr.usgs.gov/'//
*    'infobank/programs/html/audience/'//
*    'dates_audience.html">'//
*    'Intended Audience</A></CENTER>'

 write (91, '(a)')
*    '<TABLE WIDTH="500" BORDER="3">'

             write (91, '(a)')
*                '  </TR>'
         write (91, '(a)')
*            '  <TR>'
     write (AYear, '(i4.4)') Year
         write (91, '(a)')
*            '    <TD>'//
*            '<A HREF="http://walrus.wr.usgs.gov'//
*            '/infobank/programs/html/dates2html'//
*            '/'//AYear//'.html">'//AYear//'</A></TD>'

         write (91, '(a)')
*            '    <TD>'//AYear//'</TD>'
 write (91, '(a)')
*    '  </TR>'
 write (91, '(a)')
*    '</TABLE>'
 write (91, '(a,/,a,/,a,/,a)')
*    '<P>',
*    '<FONT COLOR="GREEN">',
*    'Time is nature''s way of making sure that '//
*    'everything doesn''t happen at once.',
*    '</FONT>'

    
Calls
     call system ('/bin/cat /infobank/'//
*         Alpha(Loop:Loop)//
*         '/*/meta/*.dates > '//
*         '/tmp/dates2html_dates.temp') 

         call system ('/bin/cat /infobank/'//
*         Alpha(Loop:Loop)//
*         '/*/meta/*.dates >> '//
*         '/tmp/dates2html_dates.temp')
  call openem (1,0)
     call stringlen (ID, IDLength)
     call getcentury (StartYear, StartCentury)
     call getcentury (EndYear, EndCentury)
 call system ('/bin/sort '//
*     '/tmp/dates2html_days.temp > '//
*     '/tmp/dates2html_sorted.temp')

 call system ('/bin/rm /tmp/dates2html_days.temp')
             call htmlfoot (98,
*                'http://walrus.wr.usgs.gov/'//
*                'infobank/programs/html/'//
*                'dates2html/'//
*                OutDate//'.html')

             call system ('/bin/cat '//
*                '/tmp/dates2html.part1.temp '//
*                '/tmp/dates2html.part2.temp '//
*                '/tmp/dates2html.part3.temp '//
*                '/tmp/dates2html.part4.temp '//
*                '/tmp/dates2html.part5.temp '//
*                '> /infobank/programs/html/'//
*                'dates2html/'//OutDate//'.html')

             call system ('/bin/rm '//
*                '/tmp/dates2html.part*.temp')
         call htmlhead (94, 'CMG '//OutDate//
*            ' Field Activities')

         call datebar (YearLength, CurrentYear)
     call stringlen (Link, LinkLength)
     call changecase ('SMALLS', Link(1:LinkLength))
 call htmlfoot (98,
*                'http://walrus.wr.usgs.gov/'//
*                'infobank/programs/html/'//
*                'dates2html/'//
*                OutDate//'.html')

 call system ('/bin/cat '//
*                '/tmp/dates2html.part1.temp '//
*                '/tmp/dates2html.part2.temp '//
*                '/tmp/dates2html.part3.temp '//
*                '/tmp/dates2html.part4.temp '//
*                '/tmp/dates2html.part5.temp '//
*                '> /infobank/programs/html/'//
*                'dates2html/'//OutDate//'.html')

 call system ('/bin/rm '//
*                '/tmp/dates2html.part*.temp')

 call system ('/bin/rm '//
*                '/tmp/dates2html_*.temp')

 call datecontrol
 call system ('/bin/ls -1 '//
*    '/infobank/programs/html/dates2html/????.html > '//
*    '/tmp/dates2html_htmllist.temp')

 call htmlhead (91, 'CMG Field Activities keyed on Year')
 call htmlfoot (91, 
*    'http://walrus.wr.usgs.gov/infobank/programs/'//
*    'dates2html/dates.html')

    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
 
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   Disclaimer  

URL: /infobank/programs/html/dates2html/special/specialdates2html.doc.html
Maintainer: Clint Steele
Comments: e-mail
Last modified: Wed Nov 20 15:02:51 PST 2002  (wcs)