home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / tcl / 2244 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.6 KB  |  38 lines

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