|
| |
Provides Packages for working with date and time data
- Table of Contents
- Introduction --
What Calendar can do
- Installing --
How to install PEAR::Calendar
- In A Hurry --
Just add hot water...
- Package Overview --
Summary of Calendar Classes
- Method Overview --
Summary of Calendar API
- Calendar Decorators --
What Calendar_Decorator is for
- FAQ --
Frequently Asked Questions
- Calendar -- Calendar base class
- constructor Calendar::Calendar() -- Constructs the Calendar
- Calendar::adjust() -- Adjusts the date (helper method)
- Calendar::build() -- Abstract method for building the children of a calendar object.
- Calendar::fetch() -- Iterator method for fetching child Calendar subclass objects (e.g. a
minute from an hour object). On reaching the end of the collection,
returns false and resets the collection for further iteratations.
- Calendar::fetchAll() -- Fetches all child from the current collection of children
- Calendar::getTimestamp() -- Returns a timestamp from the current date / time values. Format of
- Calendar::getValidator() -- Returns an instance of Calendar_Validator
- Calendar::isSelected() -- True if the calendar subclass object is selected (e.g. today)
- Calendar::isValid() -- Determine whether this date is valid, with the bounds determined by
- Calendar::nextDay() -- Returns the value for the next day
- Calendar::nextHour() -- Returns the value for the next hour
- Calendar::nextMinute() -- Returns the value for the next minute
- Calendar::nextMonth() -- Returns the value for next month
- Calendar::nextSecond() -- Returns the value for the next second
- Calendar::nextYear() -- Returns the value for next year
- Calendar::prevDay() -- Returns the value for the previous day
- Calendar::prevHour() -- Returns the value for the previous hour
- Calendar::prevMinute() -- Returns the value for the previous minute
- Calendar::prevMonth() -- Returns the value for the previous month
- Calendar::prevSecond() -- Returns the value for the previous second
- Calendar::prevYear() -- Returns the value for the previous year
- Calendar::setSelected() -- Defines calendar object as selected (e.g. for today)
- Calendar::setSelection() -- Abstract method for selected data objects called from build
- Calendar::setTimestamp() -- Defines the calendar by a Unix timestamp, replacing values
- Calendar::size() -- Get the number Calendar subclass objects stored in the internal
collection.
- Calendar::thisDay() -- Returns the value for this day
- Calendar::thisHour() -- Returns the value for this hour
- Calendar::thisMinute() -- Returns the value for this minute
- Calendar::thisMonth() -- Returns the value for this month
- Calendar::thisSecond() -- Returns the value for this second
- Calendar::thisYear() -- Returns the value for this year
- Calendar_Day -- Calendar_Day API
- constructor Calendar_Day::Calendar_Day() -- Constructs Calendar_Day
- Calendar_Day::build() -- Builds the Hours of the Day
- Calendar_Day::isEmpty() --
- Calendar_Day::isFirst() -- Returns true if Day object is first in a Week
- Calendar_Day::isLast() -- Returns true if Day object is last in a Week
- Calendar_Decorator -- Calendar_Decorator API
- constructor Calendar_Decorator::Calendar_Decorator() -- Constructs the Calendar_Decorator
- Calendar_Decorator::build() -- Build the children
- Calendar_Decorator::fetch() -- Iterator method for fetching child Calendar subclass objects (e.g. a
minute from an hour object). On reaching the end of the collection,
returns false and resets the collection for further iteratations.
- Calendar_Decorator::fetchAll() -- Fetches all child from the current collection of children
- Calendar_Decorator::getTimestamp() -- Returns a timestamp from the current date / time values. Format of
- Calendar_Decorator::getValidator() -- Returns an instance of Calendar_Validator
- Calendar_Decorator::isEmpty() --
- Calendar_Decorator::isFirst() -- Returns true if Day object is first in a Week
- Calendar_Decorator::isLast() -- Returns true if Day object is last in a Week
- Calendar_Decorator::isSelected() -- True if the calendar subclass object is selected (e.g. today)
- Calendar_Decorator::isValid() -- Determine whether this date is valid, with the bounds determined by
- Calendar_Decorator::nextDay() -- Returns the value for the next day
- Calendar_Decorator::nextHour() -- Returns the value for the next hour
- Calendar_Decorator::nextMinute() -- Returns the value for the next minute
- Calendar_Decorator::nextMonth() -- Returns the value for next month
- Calendar_Decorator::nextSecond() -- Returns the value for the next second
- Calendar_Decorator::nextWeek() -- Returns the value for next week
- Calendar_Decorator::nextYear() -- Returns the value for next year
- Calendar_Decorator::prevDay() -- Returns the value for the previous day
- Calendar_Decorator::prevHour() -- Returns the value for the previous hour
- Calendar_Decorator::prevMinute() -- Returns the value for the previous minute
- Calendar_Decorator::prevMonth() -- Returns the value for the previous month
- Calendar_Decorator::prevSecond() -- Returns the value for the previous second
- Calendar_Decorator::prevWeek() -- Returns the value for the previous week
- Calendar_Decorator::prevYear() -- Returns the value for the previous year
- Calendar_Decorator::setSelected() -- Defines calendar object as selected (e.g. for today)
- Calendar_Decorator::setTimestamp() -- Defines the calendar by a Unix timestamp, replacing values
- Calendar_Decorator::size() -- Get the number Calendar subclass objects stored in the internal
collection.
- Calendar_Decorator::thisDay() -- Returns the value for this day
- Calendar_Decorator::thisHour() -- Returns the value for this hour
- Calendar_Decorator::thisMinute() -- Returns the value for this minute
- Calendar_Decorator::thisMonth() -- Returns the value for this month
- Calendar_Decorator::thisSecond() -- Returns the value for this second
- Calendar_Decorator::thisWeek() -- Returns the value for this week
- Calendar_Decorator::thisYear() -- Returns the value for this year
- Calendar_Decorator_Textual -- Calendar_Decorator_Textual API
- constructor Calendar_Decorator_Textual::Calendar_Decorator_Textual() -- Constructs Calendar_Decorator_Textual
- Calendar_Decorator_Textual::monthNames() -- Returns an array of 12 month names (first index = 1)
- Calendar_Decorator_Textual::nextDayName() -- Returns textual representation of the next day of week of the decorated
calendar object
- Calendar_Decorator_Textual::nextMonthName() -- Returns textual representation of the next month of the decorated calendar
object
- Calendar_Decorator_Textual::orderedWeekdays() -- Returns the days of the week using the order defined in the decorated
- Calendar_Decorator_Textual::prevDayName() -- Returns textual representation of the previous day of week of the decorated
calendar object
- Calendar_Decorator_Textual::prevMonthName() -- Returns textual representation of the previous month of the decorated
calendar object
- Calendar_Decorator_Textual::thisDayName() -- Returns textual representation of the day of week of the decorated calendar
object
- Calendar_Decorator_Textual::thisMonthName() -- Returns textual representation of the month of the decorated calendar
object
- Calendar_Decorator_Textual::weekdayNames() -- Returns an array of 7 week day names (first index = 0)
- Calendar_Decorator_Uri -- Calendar_Decorator_Uri API
- constructor Calendar_Decorator_Uri::Calendar_Decorator_Uri() -- Constructs Calendar_Decorator_Uri
- Calendar_Decorator_Uri::next() -- Gets the URI string for the next calendar unit
- Calendar_Decorator_Uri::prev() -- Gets the URI string for the previous calendar unit
- Calendar_Decorator_Uri::setFragments() -- Sets the URI fragment names
- Calendar_Decorator_Uri::setScalar() -- Puts Uri decorator into "scalar mode" - URI variable names are
not
- Calendar_Decorator_Uri::setSeparator() -- Sets the separator string between fragments
- Calendar_Decorator_Uri::this() -- Gets the URI string for the current calendar unit
- Calendar_Decorator_Wrapper -- Calendar_Decorator_Wrapper API
- constructor Calendar_Decorator_Wrapper::Calendar_Decorator_Wrapper() -- Constructs Calendar_Decorator_Wrapper
- Calendar_Decorator_Wrapper::fetch() -- Wraps objects returned from fetch in the named Decorator class
- Calendar_Decorator_Wrapper::fetchAll() -- Wraps the returned calendar objects from fetchAll in the named decorator
- Calendar_Engine_Interface -- Calendar_Engine_Interface API
- Calendar_Engine_Interface::dateToStamp() -- Returns a timestamp
- Calendar_Engine_Interface::getDayOfWeek() -- Returns the number of the day of the week (0=sunday, 1=monday...)
- Calendar_Engine_Interface::getDaysInMonth() -- Returns the number of days in a month, given year and month
- Calendar_Engine_Interface::getDaysInWeek() -- Returns the number of days in a week
- Calendar_Engine_Interface::getFirstDayInMonth() -- Returns numeric representation of the day of the week in a month,
- Calendar_Engine_Interface::getFirstDayOfWeek() -- Returns the default first day of the week as an integer. Must be a
- Calendar_Engine_Interface::getHoursInDay() -- Returns the number of hours in a day
- Calendar_Engine_Interface::getMaxYears() -- The upper limit on years that the Calendar Engine can work with
- Calendar_Engine_Interface::getMinutesInHour() -- Returns the number of minutes in an hour
- Calendar_Engine_Interface::getMinYears() -- The lower limit on years that the Calendar Engine can work with
- Calendar_Engine_Interface::getMonthsInYear() -- Returns the number of months in a year
- Calendar_Engine_Interface::getSecondsInMinute() -- Returns the number of seconds in a minutes
- Calendar_Engine_Interface::getWeekDays() -- Returns the numeric values of the days of the week.
- Calendar_Engine_Interface::getWeekNInMonth() -- Returns the number of the week in the month, given a date
- Calendar_Engine_Interface::getWeekNInYear() -- Returns the number of the week in the year (ISO-8601), given a date
- Calendar_Engine_Interface::getWeeksInMonth() -- Returns the number of weeks in the month
- Calendar_Engine_Interface::stampToDay() -- Returns a numeric day given a timestamp
- Calendar_Engine_Interface::stampToHour() -- Returns a numeric hour given a timestamp
- Calendar_Engine_Interface::stampToMinute() -- Returns a numeric minute given a timestamp
- Calendar_Engine_Interface::stampToMonth() -- Returns a numeric month given a timestamp
- Calendar_Engine_Interface::stampToSecond() -- Returns a numeric second given a timestamp
- Calendar_Engine_Interface::stampToYear() -- Returns a numeric year given a timestamp
- Calendar_Engine_PearDate -- Calendar_Engine_PearDate API
- Calendar_Engine_PearDate::adjustDate() -- Set the correct date values (useful for math operations on dates)
- Calendar_Engine_PearDate::dateToStamp() -- Returns a iso-8601 datetime
- Calendar_Engine_PearDate::getDayOfWeek() -- Returns the number of the day of the week (0=sunday, 1=monday...)
- Calendar_Engine_PearDate::getDaysInMonth() -- Returns the number of days in a month, given year and month
- Calendar_Engine_PearDate::getDaysInWeek() -- Returns the number of days in a week
- Calendar_Engine_PearDate::getFirstDayInMonth() -- Returns numeric representation of the day of the week in a month,
- Calendar_Engine_PearDate::getFirstDayOfWeek() -- Returns the default first day of the week
- Calendar_Engine_PearDate::getHoursInDay() -- Returns the number of hours in a day
- Calendar_Engine_PearDate::getMaxYears() -- The upper limit on years that the Calendar Engine can work with
- Calendar_Engine_PearDate::getMinutesInHour() -- Returns the number of minutes in an hour
- Calendar_Engine_PearDate::getMinYears() -- The lower limit on years that the Calendar Engine can work with
- Calendar_Engine_PearDate::getMonthsInYear() -- Returns the number of months in a year
- Calendar_Engine_PearDate::getSecondsInMinute() -- Returns the number of seconds in a minutes
- Calendar_Engine_PearDate::getWeekDays() -- Returns a list of integer days of the week beginning 0
- Calendar_Engine_PearDate::getWeekNInMonth() -- Returns the number of the week in the month, given a date
- Calendar_Engine_PearDate::getWeekNInYear() -- Returns the number of the week in the year (ISO-8601), given a date
- Calendar_Engine_PearDate::getWeeksInMonth() -- Returns the number of weeks in the month
- Calendar_Engine_PearDate::stampToDay() -- Returns a numeric day given a iso-8601 datetime
- Calendar_Engine_PearDate::stampToHour() -- Returns a numeric hour given a iso-8601 datetime
- Calendar_Engine_PearDate::stampToMinute() -- Returns a numeric minute given a iso-8601 datetime
- Calendar_Engine_PearDate::stampToMonth() -- Returns a numeric month given a iso-8601 datetime
- Calendar_Engine_PearDate::stampToSecond() -- Returns a numeric second given a iso-8601 datetime
- Calendar_Engine_PearDate::stampToYear() -- Returns a numeric year given a iso-8601 datetime
- Calendar_Engine_UnixTs -- Calendar_Engine_UnixTs API
- Calendar_Engine_UnixTS::dateToStamp() -- Returns a timestamp
- Calendar_Engine_UnixTS::getDayOfWeek() -- Returns the number of the day of the week (0=sunday, 1=monday...)
- Calendar_Engine_UnixTS::getDaysInMonth() -- Returns the number of days in a month, given year and month
- Calendar_Engine_UnixTS::getDaysInWeek() -- Returns the number of days in a week
- Calendar_Engine_UnixTS::getFirstDayInMonth() -- Returns numeric representation of the day of the week in a month,
- Calendar_Engine_UnixTS::getFirstDayOfWeek() -- Returns the default first day of the week
- Calendar_Engine_UnixTS::getHoursInDay() -- Returns the number of hours in a day
- Calendar_Engine_UnixTS::getMaxYears() -- The upper limit on years that the Calendar Engine can work with
- Calendar_Engine_UnixTS::getMinutesInHour() -- Returns the number of minutes in an hour
- Calendar_Engine_UnixTS::getMinYears() -- The lower limit on years that the Calendar Engine can work with
- Calendar_Engine_UnixTS::getMonthsInYear() -- Returns the number of months in a year
- Calendar_Engine_UnixTS::getSecondsInMinute() -- Returns the number of seconds in a minutes
- Calendar_Engine_UnixTS::getWeekDays() -- Returns a list of integer days of the week beginning 0
- Calendar_Engine_UnixTS::getWeekNInMonth() -- Returns the number of the week in the month, given a date
- Calendar_Engine_UnixTS::getWeekNInYear() -- Returns the number of the week in the year (ISO-8601), given a date
- Calendar_Engine_UnixTS::getWeeksInMonth() -- Returns the number of weeks in the month
- Calendar_Engine_UnixTS::stampToDay() -- Returns a numeric day given a timestamp
- Calendar_Engine_UnixTS::stampToHour() -- Returns a numeric hour given a timestamp
- Calendar_Engine_UnixTS::stampToMinute() -- Returns a numeric minute given a timestamp
- Calendar_Engine_UnixTS::stampToMonth() -- Returns a numeric month given a timestamp
- Calendar_Engine_UnixTS::stampToSecond() -- Returns a numeric second given a timestamp
- Calendar_Engine_UnixTS::stampToYear() -- Returns a numeric year given a timestamp
- Calendar_Hour -- Calendar_Hour API
- constructor Calendar_Hour::Calendar_Hour() -- Constructs Calendar_Hour
- Calendar_Hour::build() -- Builds the Minutes in the Hour
- Calendar_Minute -- Calendar_Minute API
- constructor Calendar_Minute::Calendar_Minute() -- Constructs Minute
- Calendar_Minute::build() -- Builds the Calendar_Second objects
- Calendar_Month -- Calendar_Month API
- constructor Calendar_Month::Calendar_Month() -- Constructs Calendar_Month
- Calendar_Month::build() -- Builds Day objects for this Month. Creates as many Calendar_Day objects
- Calendar_Month_Weekdays -- Calendar_Month_Weekdays API
- constructor Calendar_Month_Weekdays::Calendar_Month_Weekdays() -- Constructs Calendar_Month_Weekdays
- Calendar_Month_Weekdays::build() -- Builds Day objects in tabular form, to allow display of calendar month
with empty cells if the first day of the week does not fall on the first
day of the month.
- Calendar_Month_Weeks -- Calendar_Month_Weeks API
- constructor Calendar_Month_Weeks::Calendar_Month_Weeks() -- Constructs Calendar_Month_Weeks
- Calendar_Month_Weeks::build() -- Builds Calendar_Week objects for the Month. Note that Calendar_Week
- Calendar_Second -- Calendar_Second API
- constructor Calendar_Second::Calendar_Second() -- Constructs Second
- Calendar_Second::build() -- Overwrite build
- Calendar_Second::fetch() -- Overwrite fetch
- Calendar_Second::fetchAll() -- Overwrite fetchAll
- Calendar_Second::size() -- Overwrite size
- Calendar_Table_Helper -- Calendar_Table_Helper API
- constructor Calendar_Table_Helper::Calendar_Table_Helper() -- Constructs Calendar_Table_Helper
- Calendar_Table_Helper::getDaysOfWeek() -- Returns the order array of days in a week
- Calendar_Table_Helper::getEmptyDaysAfter() -- Returns the index of the last real day in the month
- Calendar_Table_Helper::getEmptyDaysAfterOffset() -- Returns the index of the last real day in the month, relative to the
- Calendar_Table_Helper::getEmptyDaysBefore() -- Returns the number of empty days before the real days begin
- Calendar_Table_Helper::getFirstDay() -- Returns the first day of the month
- Calendar_Table_Helper::getNumTableDaysInMonth() -- Returns the number of real days + empty days
- Calendar_Table_Helper::getNumWeeks() -- Returns the number of tabular weeks in a month
- Calendar_Table_Helper::getWeekStart() -- Returns the timestamp of the first day of the current week
- Calendar_Validation_Error -- Calendar_Validation_Error API
- constructor Calendar_Validation_Error::Calendar_Validation_Error() -- Constructs Calendar_Validation_Error
- Calendar_Validation_Error::getMessage() -- Returns the validation error message
- Calendar_Validation_Error::getUnit() -- Returns the Date unit
- Calendar_Validation_Error::getValue() -- Returns the value of the unit
- Calendar_Validation_Error::toString() -- Returns a string containing the unit, value and error message
- Calendar_Validator -- Calendar_Validator API
- constructor Calendar_Validator::Calendar_Validator() -- Constructs Calendar_Validator
- Calendar_Validator::fetch() -- Iterates over any validation errors
- Calendar_Validator::isValid() -- Calls all the other isValidXXX() methods in the validator
- Calendar_Validator::isValidDay() -- Check whether this is a valid day
- Calendar_Validator::isValidHour() -- Check whether this is a valid hour
- Calendar_Validator::isValidMinute() -- Check whether this is a valid minute
- Calendar_Validator::isValidMonth() -- Check whether this is a valid month
- Calendar_Validator::isValidSecond() -- Check whether this is a valid second
- Calendar_Validator::isValidYear() -- Check whether this is a valid year
- Calendar_Week -- Calendar_Week API
- constructor Calendar_Week::Calendar_Week() -- Constructs Week
- Calendar_Week::build() -- Builds Calendar_Day objects for this Week
- Calendar_Week::getHelper() -- Returns the instance of Calendar_Table_Helper.
- Calendar_Week::nextWeek() -- Gets the value of the following week, according to the requested format
- Calendar_Week::prevWeek() -- Gets the value of the previous week, according to the requested format
- Calendar_Week::thisWeek() -- Gets the value of the current week, according to the requested format
- Calendar_Year -- Calendar_Year API
- constructor Calendar_Year::Calendar_Year() -- Constructs Calendar_Year
- Calendar_Year::build() -- Builds the Months of the Year.
- Package Calendar Constants -- Constants defined in and used by Calendar
Calendar Data Structures
This chapter describes how to use PEAR::Calendar
| |
|