home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / AVAILIST.ZIP / AL_TIME.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-01-04  |  3.3 KB  |  85 lines

  1. {*****************************************************************************
  2.  *                                                                           *
  3.  *                       AL_Time.Pas By Andrew Farmer                        *
  4.  *         Date/Time Calculation Module for AvaiList Revision 1.10           *
  5.  *                                                                           *
  6.  *         Copyright 1989 by Andrew D. Farmer, All Rights Reserved.          *
  7.  *                                                                           *
  8.  *                                                                           *
  9.  *     Compiled using Turbo Pascal Version 5.0 By Borland International      *
  10.  *                                                                           *
  11.  *****************************************************************************}
  12.  
  13. Procedure TIME;
  14. Begin
  15.   GetTime(hour, min, sec, smallsec);
  16.   Str(Hour,Houru);
  17.   Str(Min,Minu);
  18.   Str(sec,secu);
  19.   if Houru = '0' then houru := '00';
  20.   if Houru = '1' then houru := '01';
  21.   if Houru = '2' then houru := '02';
  22.   if Houru = '3' then houru := '03';
  23.   if Houru = '4' then houru := '04';
  24.   if Houru = '5' then houru := '05';
  25.   if Houru = '6' then houru := '06';
  26.   if Houru = '7' then houru := '07';
  27.   if Houru = '8' then houru := '08';
  28.   if Houru = '9' then houru := '09';
  29.   if Minu = '0' then Minu := '00';
  30.   if Minu = '1' then Minu := '01';
  31.   if Minu = '2' then Minu := '02';
  32.   if Minu = '3' then Minu := '03';
  33.   if Minu = '4' then Minu := '04';
  34.   if Minu = '5' then Minu := '05';
  35.   if Minu = '6' then Minu := '06';
  36.   if Minu = '7' then Minu := '07';
  37.   if Minu = '8' then Minu := '08';
  38.   if Minu = '9' then Minu := '09';
  39.   if secu = '0' then secu := '00';
  40.   if secu = '1' then secu := '01';
  41.   if secu = '2' then secu := '02';
  42.   if secu = '3' then secu := '03';
  43.   if secu = '4' then secu := '04';
  44.   if secu = '5' then secu := '05';
  45.   if secu = '6' then secu := '06';
  46.   if secu = '7' then secu := '07';
  47.   if secu = '8' then secu := '08';
  48.   if secu = '9' then secu := '09';
  49. End; {Procedure Time}
  50.  
  51. Procedure DATE;
  52. Begin
  53.   GetDate(year, month, day, dofweek);
  54.   Str(day,dayu);
  55.   if month = 1 then month2 := 'January';
  56.   if month = 2 then month2 := 'February';
  57.   if month = 3 then month2 := 'March';
  58.   if month = 4 then month2 := 'April';
  59.   if month = 5 then month2 := 'May';
  60.   if month = 6 then month2 := 'June';
  61.   if month = 7 then month2 := 'July';
  62.   if month = 8 then month2 := 'August';
  63.   if month = 9 then month2 := 'September';
  64.   if month = 10 then month2 := 'October';
  65.   if month = 11 then month2 := 'November';
  66.   if month = 12 then month2 := 'December';
  67.   if dofweek = 0 then dow := 'Sunday';
  68.   if dofweek = 1 then dow := 'Monday';
  69.   if dofweek = 2 then dow := 'Tuesday';
  70.   if dofweek = 3 then dow := 'Wednesday';
  71.   if dofweek = 4 then dow := 'Thursday';
  72.   if dofweek = 5 then dow := 'Friday';
  73.   if dofweek = 6 then dow := 'Saturday';
  74.   if dayu = '1' then dayu := '01';
  75.   if dayu = '2' then dayu := '02';
  76.   if dayu = '3' then dayu := '03';
  77.   if dayu = '4' then dayu := '04';
  78.   if dayu = '5' then dayu := '05';
  79.   if dayu = '6' then dayu := '06';
  80.   if dayu = '7' then dayu := '07';
  81.   if dayu = '8' then dayu := '08';
  82.   if dayu = '9' then dayu := '09';
  83.   mh := month2;
  84. End; {Procedure Date}
  85.