You are here

function _node_entity_diff_additional_options_date_field in Diff 7.3

Helper function to render the date flags.

3 calls to _node_entity_diff_additional_options_date_field()
_node_entity_diff_additional_options_changed in includes/node.inc
Private callback function to render the changed field.
_node_entity_diff_additional_options_created in includes/node.inc
Private callback function to render the created field.
_node_entity_diff_additional_options_revision_timestamp in includes/node.inc
Private callback function to render the revision_timestamp field.

File

includes/node.inc, line 161
Provide diff functions for the node module.

Code

function _node_entity_diff_additional_options_date_field($label, $old_date, $new_date, $context, $weight = 0) {
  $row = array(
    '#name' => $label,
    '#states' => array(),
    '#weight' => $weight,
    '#settings' => array(),
  );
  foreach ($context['states'] as $state) {
    $row['#states'][$state] = array(
      '#old' => array(
        format_date($old_date),
      ),
      '#new' => array(
        format_date($new_date),
      ),
    );
  }
  return $row;
}