Catalogue Search 

Optimized for IE 7.0 and Mozilla Firefox 2.x
Search Parameter
Search Type:
In this area you can read usefull informations about the use of search fields. As you click on a field or hover a button with your mouse some related information or examples will be displayed.
Thematic:
Product Type:
Parameter Group:
Geographical Area:
Geographical Coverage: 
 North:
 South:
 East:
 West:
Temporal Coverage: 
From:To:




setHour($hour); $d->setMinute($min); $d->setSecond($sec); if (dateIsEU($date)) return dateToEU($d,$time); else if (dateIsISO($date)) return dateToISO($d,$time); else if (dateIsUNIX($date)) return dateToUNIX($d,$time); else return $d; } // Works only on EU and ISO date _strings_ function dateSetTimeFormat($date,$time=1) { $regs=array(); switch ($time) { case 0: if (!dateHasTime($date,&$regs)) return $date; else return $regs[1]; case 1: if (!dateHasTime($date)) return $date." 00:00:00"; else if (!dateHasSeconds($date,&$regs)) return $date.":00"; else return $date; case 2: if (!dateHasTime($date)) return $date." 00:00"; else if (dateHasSeconds($date,&$regs)) return $regs[1]." ".$regs[3].":".$regs[4]; else return $date; } } // Returns a date with normalized time: // EU and ISO are returned with/without times // UNIX and Date object have their times reset to 00:00:00 or 00:00 // time=0 no time // time=1 normalize to full string 00:00:00 // time=2 compact time 00:00 function dateNormalizeTime($date,$time=1) { if (dateIsEU($date)) return dateSetTimeFormat($date,$time); if (dateIsISO($date)) return dateSetTimeFormat($date,$time); if (dateIsUNIX($date)) $d=new Date($date); else $d=$date; // date objec switch ($time) { case 0: $d->setHour(0); $d->setMinute(0); $d->setSecond(0); break; case 2: $d->setSecond(0); break; } if (dateIsUNIX($date)) return $d->getTime(); else return $d; } // General date conversion function dateToUNIX($date,$time=1) { if (dateIsUNIX($date)) return dateNormalizeTime($date,$time); else if (dateIsEU($date)) return dateEUtoUNIX($date,$time); else if (dateIsISO($date)) return dateISOtoUNIX($date,$time); else return DATE_UNIX_NULL; } function dateToEU($date,$time=1) { if (dateIsEU($date)) return dateSetTimeFormat($date,$time); else if (dateIsUNIX($date)) return dateUNIXtoEU($date,$time); else if (dateIsISO($date)) return dateISOtoEU($date,$time); else if (is_a($date,"Date") || is_subclass_of($date,"Date")) return $date->format("%d/%m/%Y".($time>0 ? ($time==1 ? " %H:%M:%S" : " %H:%M") : "")); else return ($time==1 ? DATE_EU_NULL : ($time==2 ? DATE_EU_NULL_2 : DATE_EU_NULL_3)); } function dateToISO($date,$time=1) { if (dateIsISO($date)) return dateSetTimeFormat($date,$time); else if (dateIsUNIX($date)) return dateUNIXtoISO($date,$time); else if (dateIsEU($date)) return dateEUtoISO($date,$time); else if (is_a($date,"Date") || is_subclass_of($date,"Date")) return $d->format("%Y-%m-%d".($time>0 ? ($time==1 ? " %H:%M:%S" : " %H:%M") : "")); else return ($time==1 ? DATE_ISO_NULL : ($time==2 ? DATE_ISO_NULL_2 : DATE_ISO_NULL_3)); } function &dateToDate($date,$time=1) { if (dateIsUNIX($date)) { $date=dateNormalizeTime($date,$time); $d=&new Date($date); return $d; } else if (dateIsISO($date)) { $date=dateNormalizeTime($date); // need a full timestamp $d=&new Date($date); $d=dateNormalizeTime($d,$time); return $d; } else if (dateIsEU($date)) { $date=dateNormalizeTime($date); // need a full timestamp $d=&new Date(dateEUtoUNIX($date,$time)); $d=dateNormalizeTime($d,$time); return $d; } else if (is_a($date,"Date") || is_subclass_of($date,"Date")) { $date=dateNormalizeTime($date,$time); return $date; } else return null; } /** * Converts a date string in EU format to ISO format (with or without time) * NOTE: EU dates can be in full or contracted year format (2 or 4 digits for years) * @param string $date * @param int $time include time (1=full, 2=exclude seconds) * @return string */ function dateEUtoISO($date,$time=1) { if (ereg("([0-9]{1,2})[-,/]([0-9]{1,2})[-,/]([0-9]{2,4})( ([0-9]{1,2}):([0-9]{1,2})(:([0-9]{1,2}))?)?$", $date, $regs)) { if ($regs[4]) return "$regs[3]-$regs[2]-$regs[1]".($time>0 ? ($time==1 ? " $regs[5]:$regs[6]".($regs[7] ? ":$regs[8]" : ":00") : " $regs[5]:$regs[6]") : ""); else return "$regs[3]-$regs[2]-$regs[1]".($time>0 ? ($time==1 ? " 00:00:00" : " 00:00") : ""); } else return "0000-00-00".($time>0 ? ($time==1 ? " 00:00:00" : "00:00") : ""); } /** * Converts a date string in ISO format to EU format (with or without time) * * @param string $date * @return string */ function dateISOtoEU($date,$time=1) { if (ereg("([0-9]{2,4})-([0-9]{1,2})-([0-9]{1,2})( ([0-9]{1,2}):([0-9]{1,2})(:([0-9]{1,2}))?)?$", $date, $regs)) { if ($regs[4]) return "$regs[3]/$regs[2]/$regs[1]".($time>0 ? ($time==1 ? " $regs[5]:$regs[6]".($regs[7] ? ":$regs[8]" : ":00") : " $regs[5]:$regs[6]") : ""); else return "$regs[3]/$regs[2]/$regs[1]".($time>0 ? ($time==1 ? " 00:00:00" : " 00:00") : ""); } else return "00/00/0000".($time>0 ? ($time==1 ? " 00:00:00" : "00:00") : ""); } /** * Converts a date string in EU format to a UNIX timestamp * Null dates are converted to null unix dates * @param string $date * @return string */ function dateEUtoUNIX($date,$time=1) { if ($date==DATE_EU_NULL || $date==DATE_EU_NULL_2 || $date==DATE_EU_NULL_3) return DATE_UNIX_NULL; $date=dateEUtoISO($date); // date is already normalized $d=new Date($date); $d=dateNormalizeTime($d,$time); return $d->getTime(); } /** * Converts a date string in ISO format to a UNIX timestamp * * @param string $date * @return string */ function dateISOtoUNIX($date,$time=1) { if ($date==DATE_EU_NULL || $date==DATE_EU_NULL_2 || $date==DATE_EU_NULL_3) return DATE_UNIX_NULL; $date=dateNormalizeTime($date,1); $d=new Date($date); $d=dateNormalizeTime($d,$time); return $d->getTime(); } /** * Converts a date string in UNIX timestamp to a EU format * * @param int $date * @return string */ function dateUNIXtoEU($date,$time=1) { $d=new Date($date); return $d->format("%d/%m/%Y".($time>0 ? ($time==1 ? " %H:%M:%S" : " %H:%M") : "")); } /** * Converts a date string in UNIX timestamp to a ISO format * * @param int $date * @return string */ function dateUNIXtoISO($date,$time=1) { $d=new Date($date); return $d->format("%Y-%m-%d".($time>0 ? ($time==1 ? " %H:%M:%S" : " %H:%M") : "")); } ?>