General Advice

Calling some methods has influence on the values of the instance-variables. So before calling a method make sure the variables needed have the values you are supposing they have. ;o)

 
 
Constructor (Summary)

Calendar ( )

Initializes a newly created Calendar object with default values

Calendar ( int $day, int $month, int $year [, String $lang ] )

Initializes a newly created Calendar object using the specified values

 
Variables (Summary)

int $day

day of the Calendar object

int $month

month of the Calendar object

int $year

year of the Calendar object

String $lang

language used for county-specific words of the Calendar object

boolean $show_arrows

determines whether to display navigation arrows in a generated calendar leading to the previous / following month

String $next_month

value for the HREF-parameter of the <A>-Tag for the link to the following month

String $prev_month

value for the HREF-parameter of the <A>-Tag for the link to the previous month

 
Methods (Summary)

void set_date ( int $day, int $month, int $year )

sets the variables $day, $month and $year to the specified values

int[] get_date ( )

returns the values of the variables $day, $month and $year as an array in that mentioned order

void set_next ( String $val )

sets the value for the HREF-parameter of the <A>-Tag for the link to the next month

void set_prev ( String $val )

sets the value for the HREF-parameter of the <A>-Tag for the link to the previous month

String get_weekday_as_string ( )

returns the name of the weekday belonging to the values currently set in the Calendar instance

String get_weekday_as_string ( int $day, int $month, int $year )

returns the name of the weekday belonging to the specified values

int get_weekday_as_num ( )

returns a numeric value of the weekday belonging to the values currently set in the Calendar instance

int get_weekday_as_num ( int $day, int $month, int $year )

returns a numeric value of the weekday belonging to the specified values

String get_month_as_string ( )

returns the name of the month belonging to the values currently set in the Calendar instance

String get_month_as_string ( int $month, int $year )

returns the name of the month belonging to the specified values

boolean is_day_of_weekend ( )

determines whether the date currently set in the Calendar instance is a saturday or sunday

boolean is_day_of_weekend ( int $day, int $month, int $year )

determines whether specified date is a saturday or sunday

boolean is_sunday ( )

determines whether the date currently set in the Calendar instance is a sunday

boolean is_sunday ( int $day, int $month, int $year )

determines whether specified date is a sunday

int get_last_day_of_month ( )

returns the last day of the month belonging to the date currently set in the Calendar instance

int get_last_day_of_month ( int $month, int $year )

returns the last day of the specified month

String mk_calendar ( )

draws a calendar for the month belonging to the date currently set in the Calendar instance

String mk_calendar ( int $month, int $year )

draws a calendar for the specified month

String mk_calendar_from_offset ( )

draws a calendar for the month belonging to the date currently set in the Calendar instance starting from the value that $day contains

String mk_calendar_from_offset ( int $day, int $month, int $year )

draws a calendar for the specified month starting from the value that $day contains

void show ( )

prints out an overview about the instance-variables and the values they contain

 
 
 
Konstruktor(en) (Detail)

Calendar ( )

Initializes a newly created Calendar object with default values. $day, $month and $year are being set to the current date/time values. For default $lang is set to "ge" for german language. For english language set it to "en". $show_arrows is set to TRUE and $prev_month just like $next_month is set to NULL. If those are NULL when calling mk_calendar(9 or mk_calendar_from_offset() a default hyperlink is being used. If this does not satisfy your needing set those two to whatever you wish.

Calendar ( int $day, int $month, int $year [, String $lang ] )

Initializes a newly created Calendar object. $day, $month, $year and $lang are being set to the specified values. For english language set it to "en". $show_arrows is set to TRUE and $prev_month just like $next_month is set to NULL. If those are NULL when calling mk_calendar(9 or mk_calendar_from_offset() a default hyperlink is being used. If this does not satisfy your needing set those two to whatever you wish.

 
Variablen (Detail)

int $day

day of the Calendar object

int $month

month of the Calendar object

int $year

year of the Calendar object

String $lang

Language used for county-specific words of the Calendar object. For english weekday- and month-names set this variable to "en" or "ge" for german ones.

boolean $show_arrows

Determines whether to display navigation arrows in a generated calendar leading to the previous / following month or not. TRUE for yes and FALSE for no.

String $next_month

Value for the HREF-parameter of the <A>-Tag for the link to the following month. If no value is specified and $show_arrows is set TRUE a default-hyperlink is generated.

String $prev_month

Value for the HREF-parameter of the <A>-Tag for the link to the previous month. If no value is specified and $show_arrows is set TRUE a default-hyperlink is generated.

 
Methoden (Detail)

void set_date ( int $day, int $month, int $year )

sets the variables $day, $month and $year to the specified values

int[] get_date ( )

returns the values of the variables $day, $month and $year as an array in that mentioned order

void set_next ( String $val )

sets the value for the HREF-parameter of the <A>-Tag for the link to the next month and lets it point to the document specified by $val

void set_prev ( String $val )

sets the value for the HREF-parameter of the <A>-Tag for the link to the previous month and lets it point to the document specified by $val

String get_weekday_as_string ( )

Returns the name of the weekday belonging to the values currently set in the Calendar instance (i.e. "Monday"). The language this value is returned in is determined by $lang.

String get_weekday_as_string ( int $day, int $month, int $year )

Returns the name of the weekday belonging to the specified values (i.e. "Monday"). The language this value is returned in is determined by $lang.

int get_weekday_as_num ( )

Returns a numeric value of the weekday belonging to the values currently set in the Calendar instance. Possible values are from 0 for Monday till 7 for Sunday.

int get_weekday_as_num ( int $day, int $month, int $year )

Returns a numeric value of the weekday belonging to the specified values. Possible values are from 0 for Monday till 7 for Sunday.

String get_month_as_string ( )

Returns the name of the month belonging to the values currently set in the Calendar instance (i.e. "March"). The language this value is returned in is determined by $lang.

String get_month_as_string ( int $month, int $year )

Returns the name of the month belonging to the specified values (i.e. "March"). The language this value is returned in is determined by $lang.

boolean is_day_of_weekend ( )

Determines whether the date currently set in the Calendar instance is a saturday or sunday. If yes then TRUE is returned, if not you will get a FALSE.

boolean is_day_of_weekend ( int $day, int $month, int $year )

Determines whether specified date is a saturday or sunday. If yes then TRUE is returned, if not you will get a FALSE.

boolean is_sunday ( )

Determines whether the date currently set in the Calendar instance is a sunday or not. If yes then TRUE is returned, if not you will get a FALSE.

boolean is_sunday ( int $day, int $month, int $year )

Determines whether specified date is a sunday or not. If yes then TRUE is returned, if not you will get a FALSE.

int get_last_day_of_month ( )

returns the last day of the month belonging to the date currently set in the Calendar instance

int get_last_day_of_month ( int $month, int $year )

returns the last day of the specified month

String mk_calendar ( )

Draws a calendar for the month belonging to the date currently set in the Calendar instance. With $show_arrows you can specify if you want navigation-links to the previous/following month. Use $prev_month / $next_month if the default hyperlinks do not satisfy your needings. The generated calendar is returned as a string. You can change the layout by editing the stylesheet definitions in the Calendar.php.

String mk_calendar ( int $month, int $year )

Draws a calendar for the specified month. With $show_arrows you can specify if you want navigation-links to the previous/following month. Use $prev_month / $next_month if the default hyperlinks do not satisfy your needings. The generated calendar is returned as a string. You can change the layout by editing the stylesheet definitions in the Calendar.php.

String mk_calendar_from_offset ( )

Draws a calendar for the month belonging to the date currently set in the Calendar instance starting from the day represented by $day. With $show_arrows you can specify if you want navigation-links to the previous/following month. Use $prev_month / $next_month if the default hyperlinks do not satisfy your needings. The generated calendar is returned as a string. You can change the layout by editing the stylesheet definitions in the Calendar.php.

String mk_calendar_from_offset ( int $day, int $month, int $year )

Draws a calendar for the specified month starting from the day represented by $day. With $show_arrows you can specify if you want navigation-links to the previous/following month. Use $prev_month / $next_month if the default hyperlinks do not satisfy your needings. The generated calendar is returned as a string. You can change the layout by editing the stylesheet definitions in the Calendar.php.

void show ( )

Prints out an overview about the instance-variables and the values they contain. It is intended for debugging purposes or other things like that. Use it whenever you want. :o)

 
 
Copyright by tool-garage.de