Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Class: Calendar

Source Location: /system/classes/calendar.class.php

Class Overview




Methods



Class Details

[line 104]


[ Top ]


Class Methods


constructor __construct [line 161]

Calendar __construct( )

Constructor

Initializes calendar object




Tags:

access:  public


[ Top ]

method getDayData [line 525]

object Returns getDayData( int $week, int $daynum)

Gets data for a given day



Tags:

return:  calendarDay object


Parameters:

int   $week   week of day to get data for
int   $daynum   Number of day to get data for

[ Top ]

method getDayName [line 314]

string getDayName( [int $day = 1])

Returns the name of the day of the week

This aims to help with multilingual support




Tags:

return:  Returns the text for the given day of the week


Parameters:

int   $day   Numeric day of week (1-7)

[ Top ]

method getDayOfWeek [line 178]

int getDayOfWeek( [int $day = 1], [int $month = 1], [int $year = ''])

Returns the day of the week (1-7) for given date



Tags:

return:  Returns integer for day of week 1 = Sunday through 7 = Saturday


Parameters:

int   $day   Number of day in month (1-31)
int   $month   Number of the month (1-12)
int   $year   Four digit year

[ Top ]

method getDaysInMonth [line 252]

int getDaysInMonth( [int $month = 1], [int $year = ''])

Returns the number of days in a given month/year

If no year is given, the default year is used




Tags:

return:  Returns the number of days in the month


Parameters:

int   $month   Month (1-12)
int   $year   Four digit year

[ Top ]

method getMonthName [line 359]

string getMonthName( [int $month = 1])

Returns the name of the given month (can handle different languages)

This aims to help with multi-lingual support




Tags:

return:  returns text for current month name


Parameters:

int   $month   Month (1-12) to get name of

[ Top ]

method getWeekOfMonth [line 201]

int getWeekOfMonth( [int $day = 1], [int $month = 1], [int $year = ''])

Returns the week of the month (1-5) for a given date



Tags:

return:  Week of the month, 1 - 5


Parameters:

int   $day   Number of day in month (1-31)
int   $month   Number of the month (1-12)
int   $year   Four digit year

[ Top ]

method isLeapYear [line 222]

boolean isLeapYear( [int $year = ''])

Determines if given year is a leap year or not



Tags:

return:  returns true if year is a leap year otherwise false


Parameters:

int   $year   Four digit year

[ Top ]

method setCalendarMatrix [line 477]

void setCalendarMatrix( int $month, int $year, [string $selecteddays = ''])

Builds logical model of the month in memory



Parameters:

int   $month   Month to build matrix for
int   $year   Year to build matrix for
string   $selecteddays   Comma seperated list of days to select

[ Top ]

method setLanguage [line 432]

void setLanguage( [array $lang_days = ''], [array $lang_months = ''], [ $week_start = 'Sun'])

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>'




Parameters:

array   $lang_days   Array of strings holding day language
array   $lang_months   Array of string holding month language
   $week_start  

[ Top ]

method setRollingMode [line 416]

void setRollingMode( boolean $flag)

Sets the rolling mode status

Will put calendar in normal mode or in rolling mode. Rolling mode




Parameters:

boolean   $flag   True of False

[ Top ]


Documentation generated on Sun, 02 Oct 2016 07:45:54 +0000 by phpDocumentor 1.4.3