class STTime
|
Commanly used time functions.
More... |
|
|
Public Methods
Public Members
Things for time and date functionality.
FormatingOfString:
- Bits State Defined Effect
- 0:1 0 DF_MONTH_NUMBER Shows months as a number 1 to 12
- 0:1 1 DF_MONTH_SHORT Shows months as a short text string, Ex Jan Feb Mar Apr May Jun Jul Aug \
- 0:1 2 DF_MONTH_LONG Shows months as a long text string, Ex January Feburary March...
- 2:3 0 DF_YEAR_SHORT Shows year as a two digit number, Ex 79 = 1979, 54 = 1954, 01 = ????
- 2:3 1 DF_YEAR_LONG Shows year as a four digit number, Ex 1979, 1954, 2001, 2701
- 2:3 2 DF_YEAR_WINDED Shows year as verbose text words, Ex 1981 = Nineteen hundred and eighty one.
Constructor
Destructor
int DaysSinceBce (int YearNumber)
| DaysSinceBce |
bool LeapYear (int YearNumber)
| LeapYear |
int NumberOfDaysInMonth (int MonthNumber)
| NumberOfDaysInMonth |
Returns the number of days in each month. Does not test for leap year. Month numbers are
from 0 to 11 where 0 = Jan and 11 = Dec.
int EventPassed (STIntList *ListOfEvents)
| EventPassed |
When given a list of events as date time values, this function will return the
index value of the first event that the current time has passed. If an entery in the
list does not have a date, the current date is used and the event is compaired only by
time. If a time is not given the the event is commaired as if time was midnight the start
of the given date. The passing of the first event would return a 0, no events are represented
by -1.
Change the IntList to a double list.
When given a list of events as text dates and times, this function will return the
index value of the first event that the current time has passed. If an entery in the
list does not have a date, the current date is used and the event is compaired only by
time. If a time is not given the the event is commaired as if time was midnight the start
of the given date. The passing of the first event would return a 0, no events are represented
by -1.
double TimeInFracOfDay (time_t TimeValues)
| TimeInFracOfDay |
Returns the amount of fraction of a day from a given time.
QString DayOfYearToMonth (int DayCount,int CurrentYear)
| DayOfYearToMonth |
Returns the name of the month when given the number of days since January 1 of
the same year. The current year is use do find if the year is a leap year or not.
int DayOfYearToDayMonth (int DayCount,int CurrentYear)
| DayOfYearToDayMonth |
Returns day of the month when given the number of days since January 1 of
the same year. The current year is use do find if the year is a leap year or not.
double DaysCount (time_t TimeValues)
| DaysCount |
Returns the amount of days since December 30 1899 from a given time.
Returns the amount of elapsed time since Midnight of the curren day.
Returns the amount of days since December 30 1899.
Returns the amount of elapsed time since December 30 1899. Days are hole numbers,
while hours, minites and seconds are represented in the fractional part of the number.
A number like 0.25 whould be 6:00 AM December 30 1899, and 3.75 would be January 2, 1900
at 6:00 PM. This number should be directoy compatible with Win32 date and time.
QString DateTimeString (int FormatingOfString)
| DateTimeString |
Returns a string showing the now date and time in a formated maner.
double String2DateTime (QString &TheDateTimeString, int FormatingOfString)
| String2DateTime |
Attempts to convert a formated or unformated text string to a date time value.
QString IntMonthToString (int MonthNumber, int FormatingOfString)
| IntMonthToString |
From a given number between 1 and 12 this will return a text string of the name for
the corisponding month with the format provided.
QString DateTime2String (double TheDateTimeValue,int FormatingOfString)
| DateTime2String |
Converts a date time value in to a formated string.
Formatting is like so.
- TF_ONE : MM/DD/YYYY HH:MM:SS TT
QString DateYMDCode ()
| DateYMDCode |
Returns a string that is the Year Month and Day like 20010905
const static int DF_MONTH_NUMBER
| DF_MONTH_NUMBER |
const static int DF_MONTH_SHORT
| DF_MONTH_SHORT |
const static int DF_MONTH_LONG
| DF_MONTH_LONG |
const static int DF_MONTH_MASK
| DF_MONTH_MASK |
const static int DF_YEAR_SHORT
| DF_YEAR_SHORT |
const static int DF_YEAR_LONG
| DF_YEAR_LONG |
const static int DF_YEAR_WINDED
| DF_YEAR_WINDED |
const static int DF_YEAR_MASK
| DF_YEAR_MASK |
Generated by: root on UtopiaPlanitia.Ept on Mon Dec 10 22:55:12 2001, using kdoc 2.0a53. |