|
| convert_from_gregorian ($year, $month, $day, $hour=0, $minute=0) |
| Provided with a day, month, year, hour and minute in a specific calendar type convert it into the equivalent Gregorian date.
|
|
| convert_to_gregorian ($year, $month, $day, $hour=0, $minute=0) |
| Provided with a day, month, year, hour and minute in a specific calendar type convert it into the equivalent Gregorian date.
|
|
| convert_to_timestamp ($year, $month, $day, $hour=0, $minute=0) |
| Provided with a day, month, year, hour and minute in the specific calendar type convert it into the equivalent Unix Time Stamp.
|
|
| get_date_order ($minyear=null, $maxyear=null) |
| Returns a multidimensional array with information for day, month, year and the order they are displayed when selecting a date.
|
|
| get_days () |
| Returns a list of all the possible days for all months.
|
|
| get_max_year () |
| Returns the maximum year for the calendar.
|
|
| get_min_year () |
| Returns the minimum year for the calendar.
|
|
| get_months () |
| Returns a list of all the names of the months.
|
|
| get_name () |
| Returns the name of the calendar.
|
|
| get_next_day ($daytimestamp) |
| Get the next day.
|
|
| get_next_month ($year, $month) |
| Get the next month.
|
|
| get_num_days_in_month ($year, $month) |
| Returns the number of days in a given month.
|
|
| get_num_weekdays () |
| Returns the number of days in a week.
|
|
| get_prev_day ($daytimestamp) |
| Get the previous day.
|
|
| get_prev_month ($year, $month) |
| Get the previous month.
|
|
| get_starting_weekday () |
| Returns the index of the starting week day.
|
|
| get_weekday ($year, $month, $day) |
| Returns the index of the weekday for a specific calendar date.
|
|
| get_weekdays () |
| Returns an indexed list of all the names of the weekdays.
|
|
| get_years ($minyear=null, $maxyear=null) |
| Returns an array of years.
|
|
| locale_win_charset () |
| This return locale for windows os.
|
|
| timestamp_to_date_array ($time, $timezone=99) |
| Given a $time timestamp in GMT (seconds since epoch), returns an array that represents the date in user time.
|
|
| timestamp_to_date_string ($time, $format, $timezone, $fixday, $fixhour) |
| Returns a formatted string that represents a date in user time.
|
|
calendartype_gregorian\structure::convert_from_gregorian |
( |
| $year, |
|
|
| $month, |
|
|
| $day, |
|
|
| $hour = 0, |
|
|
| $minute = 0 ) |
Provided with a day, month, year, hour and minute in a specific calendar type convert it into the equivalent Gregorian date.
In this function we don't need to do anything except pass the data back as an array. This is because the date received is Gregorian.
- Parameters
-
int | $year | |
int | $month | |
int | $day | |
int | $hour | |
int | $minute | |
- Return values
-
Reimplemented from core_calendar\type_base.
calendartype_gregorian\structure::convert_to_gregorian |
( |
| $year, |
|
|
| $month, |
|
|
| $day, |
|
|
| $hour = 0, |
|
|
| $minute = 0 ) |
Provided with a day, month, year, hour and minute in a specific calendar type convert it into the equivalent Gregorian date.
In this function we don't need to do anything except pass the data back as an array. This is because the date received is Gregorian.
- Parameters
-
int | $year | |
int | $month | |
int | $day | |
int | $hour | |
int | $minute | |
- Return values
-
Reimplemented from core_calendar\type_base.
calendartype_gregorian\structure::get_date_order |
( |
| $minyear = null, |
|
|
| $maxyear = null ) |
Returns a multidimensional array with information for day, month, year and the order they are displayed when selecting a date.
The order in the array will be the order displayed when selecting a date. Override this function to change the date selector order.
- Parameters
-
int | $minyear | The year to start with |
int | $maxyear | The year to finish with |
- Return values
-
array | Full date information |
Reimplemented from core_calendar\type_base.
calendartype_gregorian\structure::timestamp_to_date_string |
( |
| $time, |
|
|
| $format, |
|
|
| $timezone, |
|
|
| $fixday, |
|
|
| $fixhour ) |
Returns a formatted string that represents a date in user time.
Returns a formatted string that represents a date in user time WARNING: note that the format is for strftime(), not date(). Because of a bug in most Windows time libraries, we can't use the nicer e, so we have to use d which has leading zeroes. A lot of the fuss in the function is just getting rid of these leading zeroes as efficiently as possible.
If parameter fixday = true (default), then take off leading zero from d, else maintain it.
- Parameters
-
int | $time | the timestamp in UTC, as obtained from the database |
string | $format | strftime format |
int | float | string | $timezone | the timezone to use |
bool | $fixday | if true then the leading zero from d is removed, if false then the leading zero is maintained |
bool | $fixhour | if true then the leading zero from I is removed, if false then the leading zero is maintained |
- Return values
-
string | the formatted date/time |
Reimplemented from core_calendar\type_base.