<?php /** * * dtm_example.php * * This is a very simple example of how to use class.dateTimeManager.php. * * Name: dateTimeManager * Author: Albert L. Lash, IV * Email: alash@plateauinnovation.com * Version: 0.1 * Date: 08/29/02 1:00PM EST * License: GPL * */ /** Includes */ include "class.dateTimeManager.php"; /** Create new dateTimeManager object */ $shift_time_back = new dateTimeManager(); /** Shift time back three days */ $new_time = $shift_time_back->shift_dates($right_now = '', "-15", "d"); /** Let us view the new time */ echo $new_time; ?>
/** * CARE2X Integrated Hospital Information System Deployment 2.1 - 2004-10-02 * GNU General Public License * Copyright 2002,2003,2004,2005 Elpidio Latorilla * elpidio@care2x.org, * * See the file "copy_notice.txt" for the licence notice */ define('LANG_FILE', 'nursing.php'); require './include/inc_admit_station_bridge.php'; require_once $root_path . 'include/inc_front_chain_lang.php'; //if($edit&&!$_COOKIE[$local_user.$sid]) {header("location:../language/$lang/lang_".$lang."_invalid-access-warning.php"); exit;}; require_once $root_path . 'include/inc_editor_fx.php'; /* Load the data time shifter and create object */ require_once $root_path . 'classes/datetimemanager/class.dateTimeManager.php'; $dateshifter = new dateTimeManager(); //$db->debug=true; $thisfile = basename($_SERVER['PHP_SELF']); $breakfile = "nursing-station-patientdaten.php" . URL_APPEND . "&station={$station}&pn={$pn}&edit={$edit}"; if (!$kmonat) { $kmonat = date('n'); } if (!$tag) { $tag = date('j'); } if (!$jahr) { $jahr = date('Y'); } if ($dayback) { if ($tag > $dayback) { $tag -= $dayback;
exit; } //$db->debug=1; /* Load the date formatter */ require_once $root_path . 'include/inc_date_format_functions.php'; # Check the calendar date if (isset($sdate) && !empty($sdate)) { $thisday = formatDate2STD($sdate, $date_format); } elseif (!isset($thisday) || empty($thisday)) { # Set default date to today $thisday = date('Y-m-d'); } # Load date shifter class require_once $root_path . 'classes/datetimemanager/class.dateTimeManager.php'; # Create new dateTimeManager object */ $tshifter = new dateTimeManager(); # Shift time back 1 day $yesday = $tshifter->shift_dates($thisday, '1', 'd'); # Shift time forward 1 day $tomorow = $tshifter->shift_dates($thisday, '-1', 'd'); # Todays date $today = date('Y-m-d'); $opabt = get_meta_tags($root_path . 'global_conf/' . $lang . '/op_tag_dept.pid'); //setcookie(op_pflegelogbuch_user,$user); $thisfile = basename($_SERVER['PHP_SELF']); $breakfile = 'javascript:window.close()'; if (!isset($saal) || !$saal) { $saal = 1; } //default or room $pdata = array();
<?php error_reporting(E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR); require './roots.php'; require $root_path . 'include/inc_environment_global.php'; require $root_path . 'classes/datetimemanager/class.dateTimeManager.php'; $dateshifter = new dateTimeManager(); /* CARE2X Integrated Information System for Hospitals and Health Care Organizations and Services Copyright (C) 2002,2003,2004,2005 Elpidio Latorilla & Intellin.org GNU GPL. For details read file "copy_notice.txt". */ /** * This routine creates graphical chart for blood pressure and temperature */ /** * This function aligns the date to the start of the grahical chart */ function aligndate(&$ad, &$am, &$ay) { if (!checkdate($am, $ad, $ay)) { if ($am == 12) { $am = 1; $ad = 1; $ay++; } else { $am = $am + 1; $ad = 1; } } }