Public Member Functions | |
| CI_Calendar ($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 () | |
Public Attributes | |
| $CI | |
| $lang | |
| $local_time | |
| $template = '' | |
| $start_day = 'sunday' | |
| $month_type = 'long' | |
| $day_type = 'abr' | |
| $show_next_prev = FALSE | |
| $next_prev_url = '' | |
| CI_Calendar::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 |
| CI_Calendar::CI_Calendar | ( | $ | config = array() |
) |
Constructor
Loads the calendar language file and sets the default time reference
public
| CI_Calendar::default_template | ( | ) |
Set Default Template Data
This is used in the event that the user has not created their own template
public
| CI_Calendar::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 |
| CI_Calendar::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 |
| CI_Calendar::get_month_name | ( | $ | month | ) |
Get Month Name
Generates a textual month name based on the numeric month provided.
public
| integer | the month |
| CI_Calendar::get_total_days | ( | $ | month, | |
| $ | year | |||
| ) |
Total days in a given month
public
| integer | the month | |
| integer | the year |
| CI_Calendar::initialize | ( | $ | config = array() |
) |
Initialize the user preferences
Accepts an associative array as input, containing display preferences
public
| array | config preferences |
| CI_Calendar::parse_template | ( | ) |
Parse Template
Harvests the data within the template {pseudo-variables} used to display the calendar
public
| CI_Calendar::$CI |
| CI_Calendar::$day_type = 'abr' |
| CI_Calendar::$lang |
| CI_Calendar::$local_time |
| CI_Calendar::$month_type = 'long' |
| CI_Calendar::$next_prev_url = '' |
| CI_Calendar::$show_next_prev = FALSE |
| CI_Calendar::$start_day = 'sunday' |
| CI_Calendar::$template = '' |
1.5.7.1