/** * datum 17. Apr. 06 * @author coster * @param mietobject_id * liefert die stunde an dem eine zeitliche buchungseinschraenkung endet */ function getBuchungseinschraenkungZeitBisStunde($mietobjekt_id) { global $root; include_once $root . "/include/datumFunctions.inc.php"; $typ = BE_TYP_ZEIT_BIS; $res = getBuchungseinschraenkungZeitBis($mietobjekt_id, $typ); $d = mysqli_fetch_array($res); $timestamp = $d["BIS"]; $std = getHourFromMySqlTimestamp($timestamp); return $std; }
/** author:coster date:1.11.05 gibt ein formatiertes datum für html aus dem timestamp zurück */ function parseMySqlTimestamp($timestamp, $minute, $stunde, $tag, $monat, $jahr) { //mysql timestamp: // jjjj-mm-tt h h : m m : s s // 0123456789101112131415161718 $ja = getYearFromMySqlTimestamp($timestamp); $mo = getMonthFromMySqlTimestamp($timestamp); $ta = getDayFromMySqlTimestamp($timestamp); $st = getHourFromMySqlTimestamp($timestamp); $mi = getMinuteFromMySqlTimestamp($timestamp); $back = ""; if ($tag) { $back .= $ta . "."; } if ($monat) { $back .= $mo . "."; } if ($jahr) { $back .= $ja . " "; } if ($stunde) { $back .= $st . ":"; } if ($minute) { $back .= $mi; } return $back; }