public static function OfficeHoursDateHelper::createFromArray in Office Hours 8
Creates a date object from an array of date parts.
Wrapper function to centralize all Date/Time functions into DateHelper class.
Parameters
array $date_parts: Date parts for datetime.
int|null $timezone: Timezone for datetime.
array $settings: Optional settings.
Return value
\Drupal\Core\Datetime\DrupalDateTime A new DateTimePlus object.
1 call to OfficeHoursDateHelper::createFromArray()
- OfficeHoursDatelist::valueCallback in src/
Element/ OfficeHoursDatelist.php - Callback for office_hours_select element.
File
- src/
OfficeHoursDateHelper.php, line 277
Class
- OfficeHoursDateHelper
- Defines lots of helpful functions for use in massaging dates.
Namespace
Drupal\office_hoursCode
public static function createFromArray(array $date_parts, $timezone = NULL, array $settings = []) {
return DrupalDateTime::createFromArray($date_parts, $timezone, $settings);
}