function flag_views_convert_timestamp_value in Flag 6
Same name and namespace in other branches
- 6.2 includes/flag.views_convert.inc \flag_views_convert_timestamp_value()
- 7.3 includes/views/flag.views_convert.inc \flag_views_convert_timestamp_value()
- 7.2 includes/flag.views_convert.inc \flag_views_convert_timestamp_value()
In Views 1, dates were simply stored as a single string. In Views 2, the value is stored as an array of options.
1 call to flag_views_convert_timestamp_value()
- flag_views_convert in includes/
flag.views_convert.inc - Implementation of hook_views_convert().
File
- includes/
flag.views_convert.inc, line 222 - Update Views 1 views provided by both views_bookmark and flag modules.
Code
function flag_views_convert_timestamp_value($value) {
$type = 'date';
if (stripos($value, 'now') !== FALSE) {
$type = 'offset';
$value = trim(str_ireplace('now', '', $value));
}
return array(
'type' => $type,
'value' => $value,
'min' => '',
'max' => '',
);
}