Bpp/Calendar Gregorian | C++ |
|  |
This module provides facilities to manipulate date and time information in the Gregorian calendar. This section allows you to access the C++ source files of the module. This module is part of Bpp/Calendar . The files listed below are included in the interface part of the module. So any module dependent of this module is also dependent of the files listed here. The files listed below are needed by the implementation part of the module. But a module dependent of this module is not necessary dependent of the files listed here. Here are listed the types defined in the module. To use one of them, you have to specify the namespace of the module. enumeration { january=1, february=2, march=3, april=4, may=5, june=6, july=7, august=8, september=9, october=10, november=11, december=12 } tyMonth Symbolic constants for the months.
enumeration { sunday=1, monday=2, tuesday=3, wednesday=4, thursday=5, friday=6, saturday=7 } tyWeekDay Symbolic constants for the week days.
enumeration { normalYear=false, leapYear=true } tyYearKind Symbolic constants for the kind of year.
enumeration { dayFirstLongDate, dayFirstShortDate, monthFirstLongDate, monthFirstShortDate } tyDateFormat Symbolic constants for the string format of the date.
enumeration { americanLongTime, americanShortTime, militaryLongTime, militaryShortTime } tyTimeFormat Symbolic constants for the string format of the time.
Here are listed the errors that are supported or generated by the module. To use one of them, you do not have to specify the namespace of the module. erInvalidAbsoluteDay Invalid absolute day number.
erInvalidDateString Invalid date string.
erInvalidHour Invalid hour number.
erInvalidHundredth Invalid hundredth number.
erInvalidMinute Invalid minute number.
erInvalidMonth Invalid month number.
erInvalidMonthDay Invalid month day number.
erInvalidSecond Invalid second number.
erInvalidTimeString Invalid time string.
erInvalidWeekDay Invalid week day number.
erInvalidYear Invalid year number.
erTimeZoneParameterMissing The time_zone parameter is missing in the initialization file.
Here are listed the constants provided by the module. To use one of them, you have to specify the namespace of the module. tyWeekDay firstWeekDay() Week day of the 1/1/1.
tyInteger timeZone() Current time zone.
tyString timeZoneString() String indicating the current time zone.
tyInteger hourPerDay() Number of hours per day.
tyInteger minutePerDay() Number of minutes per day.
tyInteger secondPerDay() Number of seconds per day.
tyInteger hundredthPerSecond() Number of hundredths per second.
tyInteger hundredthPerMinute() Number of hundredths per minute.
tyInteger hundredthPerHour() Number of hundredths per hour.
tyInteger hundredthPerDay() Number of hundredths per day.
Here are listed the functions provided by the module. To use one of them, you have to specify the namespace of the module. inline tyInteger monthLength(tyMonth agMonth,tyYearKind agYearKind) Returns the number of days in a month.
inline tcString monthName(tyMonth agMonth) Returns the name of a month.
inline tyInteger nbDaySinceNewYear(tyMonth agMonth,tyYearKind agYearKind) Returns the number of days elapsed from the 1st of January to the 1st of a given month, according to a kind of year (leap or not).
inline tcString weekDayName(tyWeekDay agWeekDay) Returns the name of a week day.
inline tyBoolean operator == (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if two calendars are equal.
inline tyBoolean operator < (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if a calendar is before another one.
inline tyBoolean operator != (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if two calendars are different.
inline tyBoolean operator > (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if a calendar is after another one.
inline tyBoolean operator <= (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if a calendar is before or equal to another one.
inline tyBoolean operator >= (ctGregorian & agCalendar1,ctGregorian & agCalendar2) Checks if a calendar is after or equal to another one.
inline clOutStream & operator << (clOutStream & agStream,ctGregorian & agCalendar) Writes a calendar into a stream.
function clInStream & operator >> (clInStream & agStream,clGregorian & agCalendar) Reads a calendar from a stream.
function clGregorian current(void) Returns the current date-and-time.
Here are listed the classes provided by the module. To use one of them, you have to specify the namespace of the module. class clGregorian
Represents a date-and-time in the Gregorian calendar. tyInteger absoluteDay() Absolute day number (from 1 to +oo). Reading access only.
tyInteger absoluteHundredth() Absolute hundreth number in the day (from 0 to 8,639,999). Reading access only.
tyInteger year() Year number (from 1 to +oo). Reading access only.
tyMonth month() Month of the year (from 1 to 12). Reading access only.
tyInteger monthDay() Day of the month (from 1 to 31). Reading access only.
tyInteger hour() Hour of the day (from 0 to 23). Reading access only.
tyInteger minute() Minute of the hour (from 0 to 59). Reading access only.
tyInteger second() Second of the minute (from 0 to 59). Reading access only.
tyInteger hundredth() Hundredth of the second (from 0 to 99). Reading access only.
inline tyYearKind clGregorian::yearKind(void) const Returns the kind of the year (leap or not).
inline clGregorian::~clGregorian(void) Destructs the calendar.
inline tyInteger clGregorian::yearDay(void) const Returns the day of the year (from 1 to 366).
inline tyWeekDay clGregorian::weekDay(void) const Returns the day of the week (from 1 = Sunday to 7 = Saturday).
inline void clGregorian::setYear(tyInteger agNumber) Sets the year.
inline void clGregorian::setMonth(tyInteger agNumber) Sets the month.
inline void clGregorian::setYearDay(tyInteger agNumber) Sets the day of the year.
inline void clGregorian::setMonthDay(tyInteger agNumber) Sets the day of the month.
inline void clGregorian::setWeekDay(tyInteger agNumber) Sets the day of the week.
inline void clGregorian::setHour(tyInteger agNumber) Sets the hour.
inline void clGregorian::setMinute(tyInteger agNumber) Sets the minute.
inline void clGregorian::setSecond(tyInteger agNumber) Sets the second.
inline void clGregorian::setHundredth(tyInteger agNumber) Sets the hundredth.
property clGregorian::clGregorian(tyInteger agYear,tyMonth agMonth,tyInteger agMonthDay,tyInteger agHour,tyInteger agMinute,tyInteger agSecond,tyInteger agHundredth) Builds a calendar from separated information.
property clGregorian::clGregorian(ctGregorian & agCalendar) Builds a calendar from another one.
property clGregorian & clGregorian::operator = (ctGregorian & agCalendar) Copies a calendar.
property void clGregorian::addYears(tyInteger agNumber) Add years to the calendar.
property void clGregorian::addMonths(tyInteger agNumber) Add months to the calendar.
property void clGregorian::addDays(tyInteger agNumber) Add days to the calendar.
property void clGregorian::addHours(tyInteger agNumber) Add hours to the calendar.
property void clGregorian::addMinutes(tyInteger agNumber) Add minutes to the calendar.
property void clGregorian::addSeconds(tyInteger agNumber) Add seconds to the calendar.
property void clGregorian::addHundredths(tyInteger agNumber) Add hundredths to the calendar.
property void clGregorian::setDate(tyInteger agYear,tyMonth agMonth,tyInteger agMonthDay) Sets the date from separated information.
property void clGregorian::setDate(tcString agString) Sets the date from a string.
property void clGregorian::setTime(tyInteger agHour,tyInteger agMinute,tyInteger agSecond,tyInteger agHundredth) Sets the time from separated information.
property void clGregorian::setTime(tcString agString) Sets the time from a string.
property clString clGregorian::date(tyDateFormat agFormat,tyBoolean agWeekDay) const Returns a string representing the date in a given format.
property clString clGregorian::time(tyTimeFormat agFormat) const Returns a string representing the time in a given format.
property clString clGregorian::dateAndTime(tyDateFormat agDateFormat,tyTimeFormat agTimeFormat,tyBoolean agWeekDay) const Returns a string representing the date-and-time in a given format.
| | Copyright (c) 1999-2016 - Bruno Bachelet - bruno@nawouak.net - http://www.nawouak.net | Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. See this license for more details (http://www.gnu.org). |
|
| |