CodeCogs
HomeForumsCart
Login



Forgotten Password?

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
Units

Date

Date String

Unit functions
DateString::DateString unknown (int initialSize)
void DateString::trim ()
void DateString::end ()
char* DateString::getString ()
void DateString::fill (const char* format, DateTime& dt, Units::Time::summerTimeRegion region)
bool DateString::resize (int newLength)
bool DateString::resizeIfNecessary (int numCharsToBeAdded)
void DateString::append (double numToAppend, int minLength)
void DateString::append (int numToAppend, int minLength)
void DateString::append (const char* pStrToAppend, int maxLength)
void DateString::append (char pChrToAppend)

Date Time

Unit functions

Constants

Calenders: Gregorian, Julian and Excel

Year

Extracts the year from a serial Julian date. Excel: MONTH
int year (int nDate, calendar dateSystem)[inline]
int year (int nDate)[inline]

Today

Returns the current date as a serial Julian date. Excel: TODAY
int today ()

Date Diff

Computes the number of days between two serial Julian dates Open Office: DATEDIFF
int dateDiff (int startDate, int endDate)[inline]

Date Diff360

Computes the number of days between two serial dates using a 360 day accounting years. \begin{html}Excel: DAYS360\end{html}
int dateDiff360 (int startDate, int endDate, dateDiffType type=dd_USA)

Date YMD

Converts a serial Julian date into day, month and year values
void dateYMD (int nDate, int &year, int &month, int &day, calendar dateSystem=cal_Gregorian)
void dateYMD (const char* date, int &year, int &month, int &day, calendar dateSystem=cal_Gregorian, int century21st=30)

Day

Extracts the day from a serial Julian date. Excel: DAY
int day (int nDate, calendar dateSystem=cal_Gregorian)[inline]

Day Of Week

Computes the day of the week (Sunday through to Monday), for the specified serial Julian date.
int dayOfWeek (int nDate, int type=1)[inline]

Day Of Year

Computes the Gregorian day of the year from a serial Julian date.
int dayOfYear (int nDate)[inline]

First Monday

Returns the date in January when the first Monday occurs.
int firstMonday (int year)[inline]

Week Of Year

Computes the week number of a date - ISO, Excel and Simple standards implemented. \begin{html}Excel: WEEKNUM\end{html}
int weekOfYear (int nDate, weekNumStd standard=wkn_ISO, int mode=1)

Weekday Str

Returns a string for the weekday specified.
char* weekday_str (int weekDay, int type=1)

Month Str

Returns a string pointer to the month of the year.
char* month_str (int nMonth)

Easter Sunday

Calculates the date of Easter Sunday for the given year. Open Office: EASTERSUNDAY
int easterSunday (int year)[inline]
std::string easterSunday_str (int year)

Next Week Day

Advances the specified date to the next weekday.
int nextWeekDay (int nDate, bool forward=true)[inline]

Network Days

Returns the number of working days between the start and end dates, excluding holidays. Excel: NETWORKDAYS
int networkDays (int startDate, int endDate, int holidays=0, int* holidayDates=NULL)

Nth Week Day

Returns the date of the nth weekday within the specified month and year.
int nthWeekDay (int Nth, int WeekDay, int Year, int Month, int Type=1)

Days In Month

Returns the number of days in the month of a Gregorian calendars. Open Office: DAYSINMONTH
int daysInMonth (int year, int month)

Julian To Excel

Converts serial Julian date into serial Excel date
int julianToExcel (int nDate, bool Mac=false)

Work Day

Computes the working date from the specified date plus or minus \a days - excluding holidays. Excel: WORKDAY
int workDay (int nDate, int days, int holidays=0, int* holidayDates=NULL)

Excel To Julian

Converts serial Excel date into serial Julian date
int excelToJulian (int ExcelDate, bool Mac=false)

Days In Year

Returns the number of days in the year of a Gregorian calendars. Open Office: DAYSINYEAR
int daysInYear (int year)[inline]

End Of Month

Advances a serial date to the last day of the month after adding \a months. Excel: EOMONTH
int endOfMonth (int nDate, int months, calendar dateSystem=cal_Gregorian)[inline]

Month

Extracts the month from a serial Julian date. Excel: MONTH
int month (int nDate, calendar dateSystem=cal_Gregorian)[inline]

Inc Month

Advances a serial date by a number of \a Months. Excel: EDATE
int incMonth (int nDate, int months, calendar dateSystem=cal_Gregorian)[inline]

Date

Calculates the serial date from the parameters \b day, \b month and \b year. Excel: DATE
int date (int Year, int Month, int Day, calendar DateSystem=cal_Gregorian)
int date (const char* Date, calendar DateSystem=cal_Gregorian, int Century21st=30)