Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!phri!cooper!dasys1!jpr From: jpr@dasys1.UUCP (Jean-Pierre Radley) Newsgroups: comp.lang.c Subject: Re: reverse asctime()? EEEK! Keywords: dates Message-ID: <9903@dasys1.UUCP> Date: 6 Jun 89 02:43:14 GMT References: <5178@b11.ingr.com> Reply-To: jpr@dasys1.UUCP (Jean-Pierre Radley) Distribution: usa Organization: TANGENT Lines: 19 In article <5178@b11.ingr.com> abashian@b11.ingr.com (Pete Abashian) writes: >Now the problem. I need to be able to take an ascii string and >convert it back to the internal storage - number of seconds since epoch. > >The task would normally entail some simple mathematics to incorporate leap >[gag] years, etc... But what about the sticky user(s) that want to be >able to input virtually any valid combination of dates/times? 12MAY89, >12-MAY-89, May 12, 1989....etc. For the life of me I cannot remember EVER >seeing an include file or archive with a reference to such a routine. In one of the LIBraries of the TANGENT Forum on CompuServe, there is DATECALC, which permits users to input 12-may-88, or May 12, 1988, or even 12;may;88, then compare it to anothr date, or add or subtract days to the original date. I do believe that in accomplishing this, input data are converted into seconds from the epoch. This what you're after? E-Mail me if you haven't Compuserve access. -- Jean-Pierre Radley CIS: 72160,1341 jpr@jpradley.UUCP