Which function has been replaced from date_show_value() on Drupal 6.x version?
I've following code:

  $date_start = date_show_value($start, 'db', DATE_ISO);
  $date_end = date_show_value($end, 'db', DATE_ISO);
  $event_start = date_show_value($start, 'db', DATE_UNIX);
  $event_end = date_show_value($end, 'db', DATE_UNIX);

in resource_conflict.module

Comments

kenorb’s picture

I had to add this function manually:

/**
 *  A function to display the database value for the date object
 *
 *  @param $date - the date object
 *  @param $format - DATE_UNIX or DATE_ISO, the type of value to display
 *  @param $type - 'db' or 'local', the date value to display
 */
if (!function_exists('date_show_value')) {
    function date_show_value($date, $type = 'db', $format = DATE_ISO) {
      if ($format == DATE_UNIX) {
	return $date->$type->timestamp;
      }
      else {
	return $date->$type->iso;
      }
    }
}
karens’s picture

Status: Active » Fixed

The D6 and D5.2 APIs are totally different than the D5.1 API, that function was removed long ago and shouldn't be used.

kenorb’s picture

I know, but you need to write somehow this functionality if you like to convert some modules from 5.x to 6.x

karens’s picture

If you want to convert modules from 5.1 to 6.2 you will have to learn how the new API works. There is no 'matching' function in the new API for specific functions in the old API. Things work totally differently. There is already an issue about getting more documentation done for the API, but some is in the Advanced Help for the date module, if you install the Advanced Help module, and some is in the handbook.

kenorb’s picture