DateTimeCalculatorUtil Class Reference

Static Public Member Functions

static calculateNew ($calculation, DateTime $dateTime)
static calculateNewByDaysFromNow ($daysFromNow, DateTime $dateTime)

Data Fields

const YESTERDAY = 1
const TODAY = 2
const TOMORROW = 3
const NOW = 4
const WEEK = 5
const MONTH = 6
const YEAR = 7

Detailed Description

Helper functionality for making date/time calculations on a given date/time stamp.

Definition at line 41 of file DateTimeCalculatorUtil.php.


Member Function Documentation

static calculateNew ( calculation,
DateTime $  dateTime 
) [static]

Calculate a date/time stamp given a calculation value and DateTime object

Parameters:
$calculation corresponds to a calculation value from this class.
See also:
http://www.php.net/manual/en/class.datetime.php

Definition at line 83 of file DateTimeCalculatorUtil.php.

static calculateNewByDaysFromNow ( daysFromNow,
DateTime $  dateTime 
) [static]

Given an integer representing a count of days from the present day, returns a DB formatted date stamp based on that calculation.

Parameters:
integer $daysFromNow

Definition at line 133 of file DateTimeCalculatorUtil.php.


Field Documentation

const YESTERDAY = 1

The calculation will be done for yesterday.

Definition at line 46 of file DateTimeCalculatorUtil.php.

const TODAY = 2

The calculation will be done for today.

Definition at line 51 of file DateTimeCalculatorUtil.php.

const TOMORROW = 3

The calculation will be done for tomorrow.

Definition at line 56 of file DateTimeCalculatorUtil.php.

const NOW = 4

The calculation will be done for now. This is a dateTime calculation.

Definition at line 61 of file DateTimeCalculatorUtil.php.

const WEEK = 5

The calculation will be done for Week. This is a dateTime calculation.

Definition at line 66 of file DateTimeCalculatorUtil.php.

const MONTH = 6

The calculation will be done for Month. This is a dateTime calculation.

Definition at line 71 of file DateTimeCalculatorUtil.php.

const YEAR = 7

The calculation will be done for Year. This is a dateTime calculation.

Definition at line 76 of file DateTimeCalculatorUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Sep 26 07:10:23 2017