1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)idate_.c 5.2 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 /* 13 * return date in numerical form 14 * 15 * calling sequence: 16 * integer iarray(3) 17 * call idate(iarray) 18 * where: 19 * iarray will receive the current date; day, mon, year. 20 */ 21 22 #include <sys/types.h> 23 #include <sys/time.h> 24 25 idate_(iar) 26 struct { long iday; long imon; long iyer; } *iar; 27 { 28 struct tm *localtime(), *lclt; 29 long int time(), t; 30 31 t = time(0); 32 lclt = localtime(&t); 33 iar->iday = lclt->tm_mday; 34 iar->imon = lclt->tm_mon + 1; 35 iar->iyer = lclt->tm_year + 1900; 36 } 37