当前位置: 首页>>代码示例>>PHP>>正文


PHP w2p_Utilities_Date::subtractSpan方法代码示例

本文整理汇总了PHP中w2p_Utilities_Date::subtractSpan方法的典型用法代码示例。如果您正苦于以下问题:PHP w2p_Utilities_Date::subtractSpan方法的具体用法?PHP w2p_Utilities_Date::subtractSpan怎么用?PHP w2p_Utilities_Date::subtractSpan使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在w2p_Utilities_Date的用法示例。


在下文中一共展示了w2p_Utilities_Date::subtractSpan方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CProject

// Output the PDF
// make the PDF file
if ($project_id != 0) {
    $project = new CProject();
    $project->load($project_id);
    $pname = 'Project: ' . $project->project_name;
} else {
    $pname = $AppUI->_('All Projects');
}
if ($err = db_error()) {
    $AppUI->setMsg($err, UI_MSG_ERROR);
    $AppUI->redirect('m=' . $m);
}
$date = new w2p_Utilities_Date();
$last_week = new w2p_Utilities_Date($date);
$last_week->subtractSpan(new Date_Span(array(7, 0, 0, 0)));
$title = $AppUI->_('Tasks Completed Since') . ' ' . $last_week->format($df);
$options = array('showLines' => 2, 'showHeadings' => 1, 'fontSize' => 9, 'rowGap' => 4, 'colGap' => 5, 'xPos' => 50, 'xOrientation' => 'right', 'width' => '750', 'shaded' => 0, 'cols' => array(0 => array('justification' => 'left', 'width' => 250), 1 => array('justification' => 'left', 'width' => 120), 2 => array('justification' => 'center', 'width' => 120), 3 => array('justification' => 'center', 'width' => 75), 4 => array('justification' => 'center', 'width' => 75)));
$hasResources = $AppUI->isActiveModule('resources');
$perms =& $AppUI->acl();
if ($hasResources) {
    $hasResources = canView('resources');
}
// Build the data to go into the table.
$pdfdata = array();
$columns = array();
$columns[] = '<b>' . $AppUI->_('Task Name') . '</b>';
$columns[] = '<b>' . $AppUI->_('Owner') . '</b>';
$columns[] = '<b>' . $AppUI->_('Assigned Users') . '</b>';
if ($hasResources) {
    $columns[] = '<b>' . $AppUI->_('Assigned Resources') . '</b>';
开发者ID:illuminate3,项目名称:web2project,代码行数:31,代码来源:completed.php

示例2: strtok

        $sign = -1;
    }
    $day_word = strtok(' ');
    if ($day_word == $AppUI->_('Day')) {
        $days = $period_value;
    } elseif ($day_word == $AppUI->_('Week')) {
        $days = 7 * $period_value;
    } elseif ($day_word == $AppUI->_('Month')) {
        $days = 30 * $period_value;
    }
    $start_date = new w2p_Utilities_Date($ts);
    $end_date = new w2p_Utilities_Date($ts);
    if ($sign > 0) {
        $end_date->addSpan(new Date_Span(array($days, 0, 0, 0)));
    } else {
        $start_date->subtractSpan(new Date_Span(array($days, 0, 0, 0)));
    }
    $do_report = 1;
} else {
    // create Date objects from the datetime fields
    $start_date = intval($log_start_date) ? new w2p_Utilities_Date($log_start_date) : new w2p_Utilities_Date();
    $end_date = intval($log_end_date) ? new w2p_Utilities_Date($log_end_date) : new w2p_Utilities_Date();
}
if (!$log_start_date) {
    $start_date->subtractSpan(new Date_Span('14,0,0,0'));
}
$end_date->setTime(23, 59, 59);
if (function_exists('styleRenderBoxTop')) {
    echo styleRenderBoxTop();
}
?>
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:tasklist.php

示例3: strtok

        $sign = -1;
    }
    $day_word = strtok(' ');
    if ($day_word == $AppUI->_('Day')) {
        $days = $period_value;
    } elseif ($day_word == $AppUI->_('Week')) {
        $days = 7 * $period_value;
    } elseif ($day_word == $AppUI->_('Month')) {
        $days = 30 * $period_value;
    }
    $start_date = new w2p_Utilities_Date($ts);
    $end_date = new w2p_Utilities_Date($ts);
    if ($sign > 0) {
        $end_date->addSpan(new Date_Span("{$days},0,0,0"));
    } else {
        $start_date->subtractSpan(new Date_Span("{$days},0,0,0"));
    }
    $do_report = 1;
} else {
    // create Date objects from the datetime fields
    $start_date = intval($list_start_date) ? new w2p_Utilities_Date($list_start_date) : new w2p_Utilities_Date();
    $end_date = intval($list_end_date) ? new w2p_Utilities_Date($list_end_date) : new w2p_Utilities_Date();
}
if (!$list_start_date) {
    $start_date->subtractSpan(new Date_Span('14,0,0,0'));
}
$end_date->setTime(23, 59, 59);
if (function_exists('styleRenderBoxTop')) {
    echo styleRenderBoxTop();
}
?>
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:tasklist.php


注:本文中的w2p_Utilities_Date::subtractSpan方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。