Time and date operations.
This header file includes functions for obtaining and operating on times and dates. This was the first interface I specified for Megistos, while I was still a UNIX-newbie in 1994. As such, it could be suitable for a 16-bit, DOS-based BBS system, but it's exceptionally bad for a 32- or 64-bit modern operating system. Expect these functions to go away in the near future. Here's the plan:
- Kludge API to obtain and deal with proper, time_t-based dates and times. It should still try to deal with the existing 16-bit ones. This should be easy, as the 16-bit values are all less that 65535 and all dates past 6pm on the 1st of January, 1970 are greater than 65535. Both time formats should be accepted, but only the proper (time_t) format should be written.
- Make conversion scripts for times/dates in existing modules.
- Do away with the original function names to avoid modules calling them and assuming the wrong assumptions. Write new, (time_t)-only API.
- Correct all subsystems and modules that will no longer compile.
- Document new API.
Original banner, legalese and change history follow.
***************************************************************************** ** ** ** FILE: timedate.h ** ** AUTHORS: Alexios ** ** REVISION: A, July 94 ** ** PURPOSE: Various time & date handling functions ** ** NOTES: ** ** LEGALESE: ** ** ** ** This program is free software; you can redistribute it and/or modify ** ** it under the terms of the GNU General Public License as published by ** ** the Free Software Foundation; either version 2 of the License, or (at ** ** your option) any later version. ** ** ** ** This program is distributed in the hope that it will be useful, but ** ** WITHOUT ANY WARRANTY; without even the implied warranty of ** ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** ** General Public License for more details. ** ** ** ** You should have received a copy of the GNU General Public License ** ** along with this program; if not, write to the Free Software ** ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ** ** ** ***************************************************************************** * * $Id: timedate.h,v 1.3 2001/04/22 14:49:04 alexios Exp $ * * $Log: timedate.h,v $ * Revision 1.3 2001/04/22 14:49:04 alexios * Merged in leftover 0.99.2 changes and additional bug fixes. * * Revision 0.3 1998/12/27 15:19:19 alexios * Made sure Megistos is Y2K compliant (it is, but you can * never be too careful). Added function getdow() to return * the day of the week that corresponds to a certain date. * * Revision 0.2 1997/11/06 20:03:39 alexios * Added GPL legalese to the top of this file. * * Revision 0.1 1997/08/26 15:48:53 alexios * First registered revision. Adequate. * * *