package API\Core
inherited_from \TTDate

 Methods

__construct()

__construct() 
Inherited

calculateTimeOnEachDayBetweenRange()

calculateTimeOnEachDayBetweenRange($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

convertSecondsToHMS()

convertSecondsToHMS($seconds, $include_seconds = FALSE
InheritedStatic

Parameters

$seconds

$include_seconds

convertTimeZone()

convertTimeZone($epoch, $timezone) 
InheritedStatic

Parameters

$epoch

$timezone

doesRangeSpanDST()

doesRangeSpanDST($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

doesRangeSpanMidnight()

doesRangeSpanMidnight($start_epoch, $end_epoch, $match_midnight = FALSE
InheritedStatic

Parameters

$start_epoch

$end_epoch

$match_midnight

getAPIDate()

getAPIDate($format = 'DATE+TIME', $epoch) 
InheritedStatic

Parameters

$format

$epoch

getAnnualWeekDays()

getAnnualWeekDays($epoch = NULL
InheritedStatic

Parameters

$epoch

getBeginDayEpoch()

getBeginDayEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getBeginMinuteEpoch()

getBeginMinuteEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getBeginMonthEpoch()

getBeginMonthEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getBeginQuarterEpoch()

getBeginQuarterEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getBeginWeekEpoch()

getBeginWeekEpoch($epoch = NULL, $start_day_of_week = 0
InheritedStatic

Parameters

$epoch

$start_day_of_week

getBeginYearEpoch()

getBeginYearEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getBirthDateAtAge()

getBirthDateAtAge($birth_date, $age) 
InheritedStatic

Parameters

$birth_date

$age

getCalendarArray()

getCalendarArray($start_date, $end_date, $start_day_of_week = 0, $force_weeks = TRUE
InheritedStatic

Parameters

$start_date

$end_date

$start_day_of_week

$force_weeks

getDBTimeStamp()

getDBTimeStamp($epoch, $include_time_zone = TRUE
InheritedStatic

Parameters

$epoch

$include_time_zone

getDSTOffset()

getDSTOffset($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

getDate()

getDate($format = NULL, $epoch = NULL
InheritedStatic

Parameters

$format

$epoch

getDateArray()

getDateArray($start_date, $end_date, $day_of_week = FALSE
InheritedStatic

Parameters

$start_date

$end_date

$day_of_week

getDateByMonthOffset()

getDateByMonthOffset($epoch, $month_offset) 
InheritedStatic

Parameters

$epoch

$month_offset

getDateOfNextDayOfMonth()

getDateOfNextDayOfMonth($anchor_epoch, $day_of_month_epoch, $day_of_month = NULL
InheritedStatic

Parameters

$anchor_epoch

$day_of_month_epoch

$day_of_month

getDateOfNextDayOfWeek()

getDateOfNextDayOfWeek($anchor_epoch, $day_of_week_epoch) 
InheritedStatic

Parameters

$anchor_epoch

$day_of_week_epoch

getDateOfNextYear()

getDateOfNextYear($anchor_epoch, $year_epoch) 
InheritedStatic

Parameters

$anchor_epoch

$year_epoch

getDayDifference()

getDayDifference($start_epoch, $end_epoch, $round = TRUE
InheritedStatic

Parameters

$start_epoch

$end_epoch

$round

getDayOfMonth()

getDayOfMonth($epoch = NULL
InheritedStatic

Parameters

$epoch

getDayOfMonthArray()

getDayOfMonthArray() 
InheritedStatic

getDayOfWeek()

getDayOfWeek($epoch, $start_week_day = 0
InheritedStatic

Parameters

$epoch

$start_week_day

getDayOfWeekArray()

getDayOfWeekArray($translation = TRUE
InheritedStatic

Parameters

$translation

getDayOfWeekArrayByStartWeekDay()

getDayOfWeekArrayByStartWeekDay($start_week_day = 0
InheritedStatic

Parameters

$start_week_day

getDayOfWeekByInt()

getDayOfWeekByInt($int, $translation = TRUE
InheritedStatic

Parameters

$int

$translation

getDayOfWeekName()

getDayOfWeekName($dow) 
InheritedStatic

Parameters

$dow

getDayOfYear()

getDayOfYear($epoch) 
InheritedStatic

Parameters

$epoch

getDayWithMostTime()

getDayWithMostTime($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

getDays()

getDays($seconds) 
InheritedStatic

Parameters

$seconds

getDaysInMonth()

getDaysInMonth($epoch = NULL
InheritedStatic

Parameters

$epoch

getDaysInYear()

getDaysInYear($epoch = NULL
InheritedStatic

Parameters

$epoch

getEasterDays()

getEasterDays($year) 
InheritedStatic

Parameters

$year

getEndDayEpoch()

getEndDayEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getEndMonthEpoch()

getEndMonthEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getEndQuarterEpoch()

getEndQuarterEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getEndWeekEpoch()

getEndWeekEpoch($epoch = NULL, $start_day_of_week = 0
InheritedStatic

Parameters

$epoch

$start_day_of_week

getEndYearEpoch()

getEndYearEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getFiscalYearFromEpoch()

getFiscalYearFromEpoch($epoch, $offset = 3
InheritedStatic

Parameters

$epoch

$offset

getHour()

getHour($epoch = NULL
InheritedStatic

Parameters

$epoch

getHours()

getHours($seconds) 
InheritedStatic

Parameters

$seconds

getHumanTimeSince()

getHumanTimeSince($epoch) 
InheritedStatic

Parameters

$epoch

getISO8601Duration()

getISO8601Duration($time) 
InheritedStatic

Parameters

$time

getISODateStamp()

getISODateStamp($epoch) 
InheritedStatic

Parameters

$epoch

getISOTimeStamp()

getISOTimeStamp($epoch) 
InheritedStatic

Parameters

$epoch

getLastHireDateAnniversary()

getLastHireDateAnniversary($hire_date) 
InheritedStatic

Parameters

$hire_date

getMiddleDayEpoch()

getMiddleDayEpoch($epoch = NULL
InheritedStatic

Parameters

$epoch

getMinute()

getMinute($epoch = NULL
InheritedStatic

Parameters

$epoch

getMonth()

getMonth($epoch = NULL
InheritedStatic

Parameters

$epoch

getMonthDifference()

getMonthDifference($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

getMonthName()

getMonthName($month, $short_name = FALSE
InheritedStatic

Parameters

$month

$short_name

getMonthOfYearArray()

getMonthOfYearArray($short_name = FALSE
InheritedStatic

Parameters

$short_name

getNearestWeekDay()

getNearestWeekDay($epoch, $type = 0, $exclude_epochs = array()
InheritedStatic

Parameters

$epoch

$type

$exclude_epochs

returns next date from array that is after the floor date

getNextDateFromArray(integer $floor, array $dates) : mixed
InheritedStatic

Parameters

$floor

integer

$dates

array

Returns

mixed

getReportDateOptions()

getReportDateOptions($column_name_prefix = NULL, $column_name = NULL, $sort_prefix = NULL, $include_pay_period = TRUE
InheritedStatic

Parameters

$column_name_prefix

$column_name

$sort_prefix

$include_pay_period

getReportDates()

getReportDates($column, $epoch = NULL, $post_processing = TRUE, $user_obj = NULL, $params = NULL
InheritedStatic

Parameters

$column

$epoch

$post_processing

$user_obj

$params

getSecond()

getSecond($epoch = NULL
InheritedStatic

Parameters

$epoch

getSeconds()

getSeconds($hours) 
InheritedStatic

Parameters

$hours

getTime()

getTime() 
InheritedStatic

getTimeLockedDate()

getTimeLockedDate($time_epoch, $date_epoch) 
InheritedStatic

Parameters

$time_epoch

$date_epoch

getTimeOverLap()

getTimeOverLap($start_date1, $end_date1, $start_date2, $end_date2) 
InheritedStatic

Parameters

$start_date1

$end_date1

$start_date2

$end_date2

getTimeOverLapDifference()

getTimeOverLapDifference($start_date1, $end_date1, $start_date2, $end_date2) 
InheritedStatic

Parameters

$start_date1

$end_date1

$start_date2

$end_date2

getTimePeriodDates()

getTimePeriodDates($time_period, $epoch = NULL, $user_obj = NULL, $params = NULL
InheritedStatic

Parameters

$time_period

$epoch

$user_obj

$params

getTimePeriodOptions()

getTimePeriodOptions($include_pay_period = TRUE
InheritedStatic

Parameters

$include_pay_period

getTimeStamp()

getTimeStamp($year = "", $month = "", $day = "", $hour = 0, $min = 0, $sec = 0
InheritedStatic

Parameters

$year

$month

$day

$hour

$min

$sec

getTimeUnit()

getTimeUnit($seconds, $time_unit_format = NULL
InheritedStatic

Parameters

$seconds

$time_unit_format

getTimeZone()

getTimeZone() 
InheritedStatic

getTimeZoneOffset()

getTimeZoneOffset() 
InheritedStatic

getWeek()

getWeek($epoch = NULL, $start_week_day = 0
InheritedStatic

Parameters

$epoch

$start_week_day

getWeekDifference()

getWeekDifference($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

getWeeks()

getWeeks($seconds) 
InheritedStatic

Parameters

$seconds

getYear()

getYear($epoch = NULL
InheritedStatic

Parameters

$epoch

getYearDifference()

getYearDifference($start_epoch, $end_epoch) 
InheritedStatic

Parameters

$start_epoch

$end_epoch

getYearQuarter()

getYearQuarter($epoch = NULL
InheritedStatic

Parameters

$epoch

getYearQuarterMonth()

getYearQuarterMonth($epoch = NULL
InheritedStatic

Parameters

$epoch

getYearQuarterMonthNumber()

getYearQuarterMonthNumber($epoch = NULL
InheritedStatic

Parameters

$epoch

getYearQuarters()

getYearQuarters($epoch = NULL, $quarter = NULL, $day_of_month = 1
InheritedStatic

Parameters

$epoch

$quarter

$day_of_month

getYears()

getYears($seconds) 
InheritedStatic

Parameters

$seconds

graceTime()

graceTime($current_epoch, $grace_time, $schedule_epoch) 
InheritedStatic

Parameters

$current_epoch

$grace_time

$schedule_epoch

inApplyFrequencyWindow()

inApplyFrequencyWindow($frequency_id, $start_date, $end_date, $frequency_criteria = array()
InheritedStatic

Parameters

$frequency_id

$start_date

$end_date

$frequency_criteria

inWindow()

inWindow($epoch, $window_epoch, $window) 
InheritedStatic

Parameters

$epoch

$window_epoch

$window

incrementDate()

incrementDate($epoch, $amount, $unit) 
InheritedStatic

Parameters

$epoch

$amount

$unit

isBindTimeStamp()

isBindTimeStamp($str) 
InheritedStatic

Parameters

$str

isConsecutiveDays()

isConsecutiveDays($date_array) 
InheritedStatic

Parameters

$date_array

isDST()

isDST($epoch = NULL
InheritedStatic

Parameters

$epoch

isMidnight()

isMidnight($epoch) 
InheritedStatic

Parameters

$epoch

isTimeOverLap()

isTimeOverLap($start_date1, $end_date1, $start_date2, $end_date2) 
InheritedStatic

Parameters

$start_date1

$end_date1

$start_date2

$end_date2

isWeekDay()

isWeekDay($epoch = NULL
InheritedStatic

Parameters

$epoch

parseDateTime()

parseDateTime($str) 
InheritedStatic

Parameters

$str

parseTimeUnit()

parseTimeUnit($time_unit, $format = NULL
InheritedStatic

Parameters

$time_unit

$format

roundTime()

roundTime($epoch, $round_value, $round_type = 20, $grace_time = 0
InheritedStatic

Parameters

$epoch

$round_value

$round_type

$grace_time

setDateFormat()

setDateFormat($date_format) 
InheritedStatic

Parameters

$date_format

setTimeFormat()

setTimeFormat($time_format) 
InheritedStatic

Parameters

$time_format

setTimeUnitFormat()

setTimeUnitFormat($time_unit_format) 
InheritedStatic

Parameters

$time_unit_format

setTimeZone()

setTimeZone($time_zone = NULL, $force = FALSE, $execute_sql_now = TRUE
InheritedStatic

Parameters

$time_zone

$force

$execute_sql_now

snapTime()

snapTime($epoch, $snap_to_epoch, $snap_type) 
InheritedStatic

Parameters

$epoch

$snap_to_epoch

$snap_type

break up a timespan into array of days between times and on midnight if no filter break days on midnight only

splitDateRangeAtMidnight(\time $start_time_stamp, \time $end_time_stamp, \time $filter_start_time_stamp = FALSE, \time $filter_end_time_stamp = FALSE) : array
InheritedStatic

Parameters

$start_time_stamp

\time

$end_time_stamp

\time

$filter_start_time_stamp

\time

$filter_end_time_stamp

\time

Returns

array

strtotime()

strtotime($str) 
InheritedStatic

Parameters

$str

_get_month_long_names()

_get_month_long_names() 
InheritedStatic

_get_month_short_names()

_get_month_short_names() 
InheritedStatic

 Properties

 

$day_of_week_arr

$day_of_week_arr 

Default

NULL
Static
 

$long_month_of_year_arr

$long_month_of_year_arr 

Default

NULL
Static
 

$short_month_of_year_arr

$short_month_of_year_arr 

Default

NULL
Static
 

$date_format

$date_format 

Default

'd-M-y'
Static
 

$main_class

$main_class 

Default

'TTDate'
 

$month_arr

$month_arr 

Default

array('jan' => 1, 'january' => 1, 'feb' => 2, 'february' => 2, 'mar' => 3, 'march' => 3, 'apr' => 4, 'april' => 4, 'may' => 5, 'jun' => 6, 'june' => 6, 'jul' => 7, 'july' => 7, 'aug' => 8, 'august' => 8, 'sep' => 9, 'september' => 9, 'oct' => 10, 'october' => 10, 'nov' => 11, 'november' => 11, 'dec' => 12, 'december' => 12)
Static
 

$time_format

$time_format 

Default

'g:i A T'
Static
 

$time_unit_format

$time_unit_format 

Default

20
Static
 

$time_zone

$time_zone 

Default

NULL
Static