Public Member Functions | |
__construct ($config=array()) | |
initialize ($config=array()) | |
generate ($year= '', $month= '', $data=array()) | |
get_month_name ($month) | |
get_day_names ($day_type= '') | |
adjust_date ($month, $year) | |
get_total_days ($month, $year) | |
default_template () | |
parse_template () | |
Data Fields | |
$CI | |
$lang | |
$local_time | |
$template = '' | |
$start_day = 'sunday' | |
$month_type = 'long' | |
$day_type = 'abr' | |
$show_next_prev = FALSE | |
$next_prev_url = '' | |
__construct | ( | $config = array() ) |
Constructor
Loads the calendar language file and sets the default time reference
adjust_date | ( | $month, | |
$year | |||
) |
Adjust Date
This function makes sure that we have a valid month/year. For example, if you submit 13 as the month, the year will increment and the month will become January.
public
integer | the month |
integer | the year |
default_template | ( | ) |
Set Default Template Data
This is used in the event that the user has not created their own template
public
generate | ( | $year = '' , |
|
$month = '' , |
|||
$data = array() |
|||
) |
Generate the calendar
public
integer | the year |
integer | the month |
array | the data to be shown in the calendar cells |
get_day_names | ( | $day_type = '' ) |
Get Day Names
Returns an array of day names (Sunday, Monday, etc.) based on the type. Options: long, short, abrev
public
string |
get_month_name | ( | $month) |
Get Month Name
Generates a textual month name based on the numeric month provided.
public
integer | the month |
get_total_days | ( | $month, | |
$year | |||
) |
Total days in a given month
public
integer | the month |
integer | the year |
initialize | ( | $config = array() ) |
Initialize the user preferences
Accepts an associative array as input, containing display preferences
public
array | config preferences |
parse_template | ( | ) |
Parse Template
Harvests the data within the template {pseudo-variables} used to display the calendar
public