<?php
/**
 * @package addfunctions
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf 
 */


class DateTimeOperationsMySQL extends DateTimeOperationsServer
{
  
  function getShortDateStr($datetimevalue) {
    return StringOperations::substr($datetimevalue, 8, 2).".".StringOperations::substr($datetimevalue, 5, 2).".";
  }

  
  function getFormatDate4Server($day, $month, $year) {
    return "'".$year."-".$month."-".$day."'";
  }

  
  
  
  function getFormatTime4Server($minute, $hour, $day = 30, $month = 12, $year = 1899, $second = 0) {
    $format = "H:i'";
    if ($second !== 0) {
      $format = "H:i:s'";
    }
    return "'$year-$month-$day ".date($format, mktime($hour, $minute, $second));
    
  }
  
  public function getInvalidDate4Server()
  {
    return $this->getFormatDate4Server('00', '00', '0000');
  }
}