File: grdate.f

package info (click to toggle)
pgplot5 5.2.2-19.7
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 7,188 kB
  • sloc: fortran: 39,795; ansic: 22,554; objc: 1,534; sh: 1,298; makefile: 267; pascal: 233; perl: 209; tcl: 190; awk: 51; csh: 25
file content (32 lines) | stat: -rw-r--r-- 1,111 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
C*GRDATE -- get date and time as character string (MS-DOS)
C+
      SUBROUTINE GRDATE(CDATE, LDATE)
      CHARACTER CDATE*(17)
      INTEGER   LDATE
C
C Return the current date and time, in format 'dd-Mmm-yyyy hh:mm'.
C To receive the whole string, the CDATE should be declared
C CHARACTER*17.
C
C Arguments:
C  CDATE : receives date and time, truncated or extended with
C           blanks as necessary.
C  L      : receives the number of characters in STRING, excluding
C           trailing blanks. This will always be 17, unless the length
C           of the string supplied is shorter.
C--
C 1989-Mar-17 - [AFT]
C-----------------------------------------------------------------------
      CHARACTER CMON(12)*3
      INTEGER*2 IHR, IMIN, ISEC, I100TH
      INTEGER*2 IYR, IMON, IDAY
      DATA CMON/'Jan','Feb','Mar','Apr','May','Jun',
     :          'Jul','Aug','Sep','Oct','Nov','Dec'/
C---
      CALL GETTIM(IHR, IMIN, ISEC, I100TH)
      CALL GETDAT(IYR, IMON, IDAY)
      WRITE(CDATE,111) IDAY,CMON(IMON),IYR,IHR,IMIN
  111 FORMAT(I2,'-',A3,'-',I4,' ',I2,':',I2)
      LDATE=17
      RETURN
      END