Topic: Calendar - Undefined index: Date_format in

Hi there,
i have this error in my header: Undefined index: Date_format in .../forums/calendar/header.php on line 74
I hope u can help me

Greetings

2 (edited by cherry1499 2007-08-22 16:07)

Re: Calendar - Undefined index: Date_format in

Sorry - Line ... forums/calendar/header.php on line 60

In my header.php Line 60

switch($date) {

Any reason? Please, its important...

My Calendar works fine....
Only the Error in my Header, but not in the calendar

Re: Calendar - Undefined index: Date_format in

Maybe your code got a bit mangled somehow.

In my version of the Calendar (v2.08a beta), the code block between lines 60 and 100 in header.php looks like this:

/*====================*/
$date_format = $lang_calendar['Date_format'];
if ($date_format == 'US') {
   $datestring = $monthtext." ".$dayfull." ".$year;
} else {
   $datestring = $day." ".$lang_calendar[$monthtext]." ".$year;
}

/*====================*/
/*=  date_str        =*/
/*====================*/

function date_str($datestamp){
   global $lang_calendar;

   if ($lang_calendar['Date_format'] == 'US') {
      return date("M jS Y", $datestamp);
   } else {
      return (date("j ", $datestamp)).($lang_calendar[(date("M", $datestamp))]).(date(" Y", $datestamp));
   }
}

/*====================*/
/*= Change Start Day =*/
/*====================*/
function start_date($date){
    global $CFG_start_day;

    if($CFG_start_day == "M"){
        switch($date) {
            case 0:
                $start = 6;
                break;
            default:
                $start = $date - 1;
                break;
        }
    }elseif($CFG_start_day == "S")
        $start = $date;

    return $start;
}

Does yours look the same?