[ Index ] |
|
Code source de GeekLog 1.4.1 |
[Code source] [Imprimer] [Statistiques]
This file contains the two classes used to help support the calendar pages. Please note that our calendar code is in shambles and is hard to understand. Not so much this file as /calendar/index.php and calendar/event.php. Those files along with this class need to be reworked to be easier to maintain and support rich calendaring features
Author: | Tony Bibbs <tony@tonybibbs.com> |
Poids: | 530 lignes (15 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
CalendarDay:: (4 méthodes):
CalendarDay()
isWeekend()
isHoliday()
isSelected()
Calendar:: (12 méthodes):
_isRollingMode()
Calendar()
getDayOfWeek()
getWeekOfMonth()
isLeapYear()
getDaysInMonth()
getDayName()
getMonthName()
setRollingMode()
setLanguage()
setCalendarMatrix()
getDayData()
Classe: CalendarDay - X-Ref
This class represents the logical structure of a calendar day and is used byCalendarDay() X-Ref |
Constructur |
isWeekend() X-Ref |
Returns if this day is on a weekend return: boolean true if is on weekend otherwise false |
isHoliday() X-Ref |
Returns if this day is a holiday return: boolean true if day is a holiday otherwise false |
isSelected() X-Ref |
Returns if this day is selected return: boolean true if day is selected otherwise false |
_isRollingMode() X-Ref |
Returns if calendar is in rolling mode return: boolean returns true if in rolling mode otherwise false |
Calendar() X-Ref |
Constructor Initializes calendar object |
getDayOfWeek($day = 1, $month = 1, $year = '') X-Ref |
Returns the day of the week (1-7) for given date param: int $day Number of day in month (1-31) param: int $month Number of the month (1-12) param: int $year Four digit year return: int Returns integer for day of week 1 = Sunday through 7 = Saturday |
getWeekOfMonth($day = 1, $month = 1, $year = '') X-Ref |
Returns the week of the month (1-5) for a given date param: int $day Number of day in month (1-31) param: int $month Number of the month (1-12) param: int $year Four digit year return: int Week of the month, 1 - 5 |
isLeapYear($year = '') X-Ref |
Determines if given year is a leap year or not param: int $year Four digit year return: boolean returns true if year is a leap year otherwise false |
getDaysInMonth($month = 1, $year = '') X-Ref |
Returns the number of days in a given month/year If no year is given, the default year is used param: int $month Month (1-12) param: int $year Four digit year return: int Returns the number of days in the month |
getDayName($day = 1) X-Ref |
Returns the name of the day of the week This aims to help with multilingual support param: int $day Numeric day of week (1-7) return: string Returns the text for the given day of the week |
getMonthName($month = 1) X-Ref |
Returns the name of the given month (can handle different languages) This aims to help with multi-lingual support param: int $month Month (1-12) to get name of return: string returns text for current month name |
setRollingMode($flag) X-Ref |
Sets the rolling mode status Will put calendar in normal mode or in rolling mode. Rolling mode param: boolean $flag True of False |
setLanguage($lang_days='', $lang_months='', $week_start='Sun') X-Ref |
Sets the language for days of the week and months of year This function defaults to English. Day array format is _lang_days['<daynameinenglish>'] = '<translation>' Mondy array format is _lang_months['<monthnameinenglish'] = '<translation>' param: array $lang_days Array of strings holding day language param: array $lang_months Array of string holding month language |
setCalendarMatrix($month, $year, $selecteddays='') X-Ref |
Builds logical model of the month in memory param: int $month Month to build matrix for param: int $year Year to build matrix for param: string $selecteddays Comma seperated list of days to select |
getDayData($week,$daynum) X-Ref |
Gets data for a given day param: int $week week of day to get data for param: int $daynum Number of day to get data for return: object Returns calendarDay object |
Généré le : Wed Nov 21 12:27:40 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |