DATE_FORMAT
DATE_FORMAT
Calendar of a person's free/busy calendar (either one calendar or multiple). This contains the details for a person's availability.
setConfig(array<mixed,mixed> $config) : \MPorcheron\FreeBusyCal\FreeBusyCalendar
Set the configuration values to be used in the generation of the representation of the calendar.
array<mixed,mixed> | $config | Configuration dats. |
$this
.
getCalendarDates(string $format = self::DATE_FORMAT) : array<mixed,string>
Retrieve the values labels for the calendar dates to be displayed.
string | $format | PHP |
Array of the calendar dates to be displayed.
getCalendarTimes(string $format = self::TIME_FORMAT) : array<mixed,string>
Retrieve the values labels for the calendar times to be displayed. At the moment, only hours are supported.
string | $format | PHP |
Array of the calendar times to be displayed.
[YYYY-mm-dd][hour][minute] => [current time formatted, next time formatted]
isFree(string $date, string $hour, string $minute) : boolean
Determine if we are available at a given time.
string | $date | Date to check if available in YYYY-mm-dd format. |
string | $hour | Hour to check if available. |
string | $minute | Minute to check if available. |
If the queried date or time is out of the given calendar range.
If the calendar hasn't been fetched yet.
true
if available, false otherwise.
merge(\MPorcheron\FreeBusyCal\FreeBusyCalendar $cal)
Merge availability data. If busy, will remain busy.
\MPorcheron\FreeBusyCal\FreeBusyCalendar | $cal | Availability matrix to merge. |