function views_gantt_normalize_date_field in Views Gantt 7.2
Same name and namespace in other branches
- 7 views_gantt.module \views_gantt_normalize_date_field()
Formats date for Gantt Chart.
5 calls to views_gantt_normalize_date_field()
- views_gantt_plugin_style_gantt::load_missing_values in ./
views_gantt_plugin_style_gantt.inc - views_gantt_plugin_style_gantt::project_date in ./
views_gantt_plugin_style_gantt.inc - views_gantt_plugin_style_gantt::views_gantt_get_field_value in ./
views_gantt_plugin_style_gantt.inc - Returns value of specific field.
- views_gantt_plugin_style_gantt::views_gantt_get_node_field_value in ./
views_gantt_plugin_style_gantt.inc - Returns value of specific field from node.
- views_gantt_update_node in ./
views_gantt.module - Updates node if there are changes in it's fields.
File
- ./
views_gantt.module, line 276 - Module file for Views Gantt
Code
function views_gantt_normalize_date_field(&$field, $format = 'Y-m-d H:i') {
if (!is_numeric($field)) {
$field = strtotime($field);
}
$field = format_date($field, 'custom', $format);
}