home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!psinntp!sugar!karl
- From: karl@NeoSoft.com (Karl Lehenbauer)
- Subject: Re: tcl function for dates
- Organization: NeoSoft Communications Services -- (713) 684-5900
- Date: Thu, 24 Dec 1992 02:10:33 GMT
- Message-ID: <BzqrDM.Iqr@NeoSoft.com>
- References: <1h7qe1INNck1@gazette.bcm.tmc.edu>
- Lines: 27
-
- In article <1h7qe1INNck1@gazette.bcm.tmc.edu> prabhag@nicolle.iaims.bcm.tmc.edu (Prabha Ganapathy) writes:
- >I'm looking for a function for manuplating dates, similar to one available on
- >relational databases as Sybase. Is someone has written a similar function, or knows
- >where I can find the code, please send me e-mail.
-
- I don't know what Sybase offers, so I can't compare them to the date functions
- that come with Extended Tcl, but I can tell you about those.
-
- "fmtclock" turns Unix since-1970 integer values into reasonable, human-
- readable dates and times according to a format string. Essentially,
- it's a Tcl interface to strftime.
-
- "getclock" returns the current time as an integer value.
-
- "convertclock", one of my favorites, interfaces to the getdate.y grammar
- ``everybody'' uses to parse the myriad date formats generated by all the
- various news and mail clients. It takes a date and/or time string and
- returns the equivalent since-1970 integer time.
-
- Tcl also has the three commands "file atime", "file mtime" and "file ctime"
- which return the atime, mtime and ctime for files as an int, plus there's the
- "file stat" and "file lstat" commands, and Extended Tcl has "fstat" for
- statting open filehandles.
-
- --
- -- Email info@NeoSoft.com for info on getting interactive Internet access.
- "In a minute, I'll burp up your droid."
-