You are here

function _jstimer_date_to_widget in Javascript Timer 7

1 call to _jstimer_date_to_widget()
jstimer_field_formatter_view in ./jstimer.field.inc
Implements hook_field_formatter_view(). Normal behavior for two date fields is to use value1 where it is available. Use value2 only if value1 is empty.

File

./jstimer.field.inc, line 102
Field hooks to implement a jstimer field.

Code

function _jstimer_date_to_widget($date, $widget_name, $settings = array()) {
  $datetime = date_iso8601(strtotime($date));
  $widget_args = array(
    'widget_name' => $widget_name,
    'widget_args' => array(
      'datetime' => $datetime,
    ),
  );
  $widget_args['widget_args'] += $settings;
  return $widget_args;
}