File: grdate.f

package info (click to toggle)
pgplot5 5.2-13
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 6,280 kB
  • ctags: 5,903
  • sloc: fortran: 37,938; ansic: 18,809; sh: 1,147; objc: 532; makefile: 363; perl: 234; pascal: 233; tcl: 178; awk: 51; csh: 25
file content (34 lines) | stat: -rw-r--r-- 1,074 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
33
34
C*GRDATE -- get date and time as character string (Alliant-UNIX)
C+
      SUBROUTINE GRDATE(STRING, L)
      CHARACTER*(*) STRING
      INTEGER L
C
C Return the current date and time, in format 'dd-Mmm-yyyy hh:mm'.
C To receive the whole string, the STRING should be declared
C CHARACTER*17.
C
C Arguments:
C  STRING : 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 28-Jul-1988
C 23-Oct-1989 ALF. Conforms to Alliant use of FDATE.
C-----------------------------------------------------------------------
      CHARACTER*24 UTIME, FDATE
      CHARACTER*17 VTIME
C
      UTIME = FDATE()
      VTIME(1:2) = UTIME(9:10)
      VTIME(3:3) = '-'
      VTIME(4:6) = UTIME(5:7)
      VTIME(7:7) = '-'
      VTIME(8:11) = UTIME(21:24)
      VTIME(12:12) = ' '
      VTIME(13:17) = UTIME(12:16)
      STRING = VTIME
      L = MIN(17, LEN(STRING))
      END