class STTime

Commanly used time functions. More...

Definition#include <STTime.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Members


Detailed Description

Things for time and date functionality.

FormatingOfString:

 STTime ()

STTime

Constructor

 ~STTime ()

~STTime

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.

int  EventPassed (STStringList *ListOfEvents)

EventPassed

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.

double  Time ()

Time

Returns the amount of elapsed time since Midnight of the curren day.

double  Date ()

Date

Returns the amount of days since December 30 1899.

double  Now ()

Now

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.

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.