timedate.h

Go to the documentation of this file.
00001 
00002 /*  $Id: timedate.h 388 2005-01-15 00:35:52Z sethdill $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #ifndef timedateinclude
00029 #define timedateinclude
00030 
00031 typedef struct tyinternationalinfo {
00032     char * longDaysOfWeek[10];
00033     char * shortDaysOfWeek[10];
00034     char * longMonths[13];
00035     char * shortMonths[13];
00036     char * longYears[12];       //Year descriptions
00037     char * morning;
00038     char * evening;
00039     char * military;
00040     char * currency;            //for the US this is $
00041     char * intlCurrency;        //for the US this is USD
00042     char * shortDateFormatPattern;
00043     char * longDateFormatPattern;
00044     char * decimal;
00045     char * thousands;
00046     char * list;
00047     char * timesep;
00048     char * datesep;
00049     short numberOfDays;         //Usally 7 plus 3 for Yesterday, Today, and Tomorrow
00050     short numberOfMonths;
00051     short daysInMonth[13];      //For Gregorian calendar February is listed as 28 and corrected in code.
00052     short numberOfYears;
00053     boolean defaultTimeFormat;  //false = 12hour
00054     } tyinternationalinfo, * tyinternationalinfoptr;
00055 
00056 
00057 #ifdef MACVERSION
00058 /* #define getlongermilliseconds() (unsigned long long)FastMilliseconds() */
00059 #define getmilliseconds() (long)FastMilliseconds()
00060 #endif
00061 
00062 /*prototypes*/
00063 
00064 extern void timestamp (long *);
00065 
00066 extern unsigned long timenow (void);
00067 
00068 extern boolean setsystemclock (unsigned long);
00069 
00070 extern boolean timegreaterthan (unsigned long, unsigned long);
00071 
00072 extern boolean timelessthan (unsigned long, unsigned long);
00073 
00074 extern boolean timetotimestring (unsigned long, bigstring, boolean);
00075 
00076 extern boolean timetodatestring (unsigned long, bigstring, boolean);
00077 
00078 extern boolean stringtotime (bigstring, unsigned long *);
00079 
00080 extern long datetimetoseconds (short, short, short, short, short, short);
00081 
00082 extern void secondstodatetime (long, short *, short *, short *, short *, short *, short *);
00083 
00084 extern void secondstodayofweek (long, short *);
00085 
00086 #ifdef WIN95VERSION
00087 
00088 extern long filetimetoseconds (const FILETIME *);
00089 
00090 extern void secondstofiletime (long seconds, FILETIME *);
00091 
00092 extern tyinternationalinfoptr getIntlInfo ();
00093 
00094 #endif
00095 
00096 extern unsigned long nextmonth(unsigned long date);
00097 
00098 extern unsigned long nextyear(unsigned long date);
00099 
00100 extern unsigned long prevmonth(unsigned long date);
00101 
00102 extern unsigned long prevyear(unsigned long date);
00103 
00104 extern unsigned long firstofmonth(unsigned long date);
00105 
00106 extern unsigned long lastofmonth(unsigned long date);
00107 
00108 extern short daysInMonth (short month, short year);
00109 
00110 extern void shortdatestring (unsigned long date, bigstring bs);
00111 
00112 extern void longdatestring (unsigned long date, bigstring bs);
00113 
00114 extern void abbrevdatestring (unsigned long date, bigstring bs);
00115 
00116 extern void getdaystring (short dayofweek, bigstring bs, boolean flFullname);
00117 
00118 extern long getcurrenttimezonebias(void);
00119 
00120 extern boolean isLeapYear (short year);
00121 
00122 #ifdef WIN95VERSION
00123 
00124 extern long getmilliseconds(void);  /* mac version is #defined near the top of the file */
00125 
00126 #endif /* WIN95VERSION */
00127 
00128 #endif /*timedateinclude*/

Generated on Wed May 31 18:20:03 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6