1*47944Sbostic /*- 2*47944Sbostic * Copyright (c) 1980 The Regents of the University of California. 3*47944Sbostic * All rights reserved. 42398Sdlw * 5*47944Sbostic * %sccs.include.proprietary.c% 623030Skre */ 723030Skre 8*47944Sbostic #ifndef lint 9*47944Sbostic static char sccsid[] = "@(#)idate_.c 5.2 (Berkeley) 04/12/91"; 10*47944Sbostic #endif /* not lint */ 11*47944Sbostic 1223030Skre /* 132398Sdlw * return date in numerical form 142398Sdlw * 152398Sdlw * calling sequence: 162398Sdlw * integer iarray(3) 172398Sdlw * call idate(iarray) 182398Sdlw * where: 192398Sdlw * iarray will receive the current date; day, mon, year. 202398Sdlw */ 212398Sdlw 222398Sdlw #include <sys/types.h> 2313583Swnj #include <sys/time.h> 242398Sdlw 252398Sdlw idate_(iar) 262398Sdlw struct { long iday; long imon; long iyer; } *iar; 272398Sdlw { 282398Sdlw struct tm *localtime(), *lclt; 292398Sdlw long int time(), t; 302398Sdlw 312398Sdlw t = time(0); 322398Sdlw lclt = localtime(&t); 332398Sdlw iar->iday = lclt->tm_mday; 342398Sdlw iar->imon = lclt->tm_mon + 1; 352398Sdlw iar->iyer = lclt->tm_year + 1900; 362398Sdlw } 37