Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

DateInfo class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

DateInfo Class Reference

#include <ODATE.H>

List of all members.

Public Methods

long julian (int, int, int)
long julian (char *)
char * date_str (long, int=0, int=1)
char * month_str (int)
int year (long julianDate)
int month (long julianDate)
int day (long julianDate)
char * time_str (int)
int days_in_month (int)
int day_year (int, int, int)
int add_months (int inDate, int addMonth)
int file_time_to_julian (FILETIME &fileTime)
int get_date (long, char)


Detailed Description

Utility class with functions for getting day, month, and year information.

Definition at line 16 of file ODATE.H.


Member Function Documentation

int DateInfo::add_months int    inDate,
int    addMonth
 

Add months to the given julian date.

<int> inDate = the input julian date <int> addMonth = the no. of months to add

return : <int> - the result julian date

Definition at line 347 of file ODATE.CPP.

char * DateInfo::date_str long    julianDate,
int    shortMonthStr = 0,
int    showDate = 1
 

Convert from julian date format to string date format Return a date string in the format of DD MMM YYYY e.g. 15 Jan 1992

Julian day is the number of days since the date Jan 1, 4713 BC Ex. Jan 1, 1981 is 2444606

<long> julianDate = the julian date to be converted [int] shortMonthStr = short month string or not (e.g. Jan instead of January) (default : 0) [int] showDate = show date or not (default : 1)

Return : <char*> the formated date string

Definition at line 159 of file ODATE.CPP.

References JULIAN_ADJUSTMENT, and NULL.

int DateInfo::day long    julianDate [inline]
 

Definition at line 27 of file ODATE.H.

References get_date().

Referenced by day_year().

int DateInfo::day_year int    year,
int    month,
int    day
 

Returns an (int) day of the year starting from 1. Ex. Jan 1, returns 1

Returns -1 if it is an illegal date.

Definition at line 235 of file ODATE.CPP.

References day(), month(), and year().

int DateInfo::days_in_month int    inMonth
 

return the no. of days in a given month

<int> inMonth = the specified month

return : <int> = the no. of days in a given monthh

Definition at line 332 of file ODATE.CPP.

int DateInfo::file_time_to_julian FILETIME &    fileTime
 

Definition at line 369 of file ODATE.CPP.

int DateInfo::get_date long    julianDate,
char    returnType
 

Return year, month or day of the given julian date

<long> julianDate = the julian date to be converted <char> returnType = 'Y'-year, 'M'-month, 'D'-day

Return : the year, month or day of the julian date -1 if the julian date passed is invalid

Definition at line 95 of file ODATE.CPP.

References JULIAN_ADJUSTMENT.

Referenced by day(), month(), and year().

long DateInfo::julian char *    dateStr
 

Convert a string such as "07/03/93" to long number

Returns: <int> >0 - Julian day That is the number of days since the date Jan 1, 4713 BC Ex. Jan 1, 1981 is 2444606 0 - NULL Date (dbf_date is all blank) -1 - Illegal Date

Definition at line 78 of file ODATE.CPP.

long DateInfo::julian int    year,
int    month,
int    day
 

Convert from year, month, day integer format to julian date format

Julian day is the number of days since the date Jan 1, 4713 BC Ex. Jan 1, 1981 is 2444606

<int> year, month, day = the components of the date

Return : <long> the julian date -1 illegal given date

Definition at line 50 of file ODATE.CPP.

References JULIAN_ADJUSTMENT.

int DateInfo::month long    julianDate [inline]
 

Definition at line 26 of file ODATE.H.

References get_date().

Referenced by day_year().

char * DateInfo::month_str int    monthNo
 

<int> monthNo = the month (1-12)

Return : <char*> the month string

Definition at line 221 of file ODATE.CPP.

char * DateInfo::time_str int    inTime
 

Given a integer as time and then return the time string

<int> inTime = the time in integer format (e.g. 1600 --> "16:00" )

Definition at line 308 of file ODATE.CPP.

int DateInfo::year long    julianDate [inline]
 

Definition at line 25 of file ODATE.H.

References get_date().

Referenced by day_year().


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:03 2002 for VirtualU by doxygen1.2.17