APITTDate - staffcheck/api GitHub Wiki
- Class name: APITTDate
- Namespace:
- Parent class: TTDate
protected mixed $main_class = 'TTDate'
- Visibility: protected
protected mixed $time_zone = NULL
- Visibility: protected
- This property is static.
protected mixed $date_format = 'd-M-y'
- Visibility: protected
- This property is static.
protected mixed $time_format = 'g:i A T'
- Visibility: protected
- This property is static.
protected mixed $time_unit_format = 20
- Visibility: protected
- This property is static.
protected mixed $month_arr = 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)
- Visibility: protected
- This property is static.
public mixed $day_of_week_arr = NULL
- Visibility: public
- This property is static.
public mixed $long_month_of_year_arr = NULL
- Visibility: public
- This property is static.
public mixed $short_month_of_year_arr = NULL
- Visibility: public
- This property is static.
mixed TTDate::__construct()
TTDate constructor.
- Visibility: public
- This method is defined by TTDate
array TTDate::_get_month_short_names()
- Visibility: private
- This method is static.
- This method is defined by TTDate
array TTDate::_get_month_long_names()
- Visibility: private
- This method is static.
- This method is defined by TTDate
boolean TTDate::isDST(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
string TTDate::getTimeZone()
- Visibility: public
- This method is static.
- This method is defined by TTDate
string TTDate::detectSystemTimeZone()
Attempts to detect the full time zone in use by the system on both Windows and Linux.
- Visibility: public
- This method is static.
- This method is defined by TTDate
boolean TTDate::setTimeZone(null $time_zone, boolean $force, boolean $execute_sql_now)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_zone null
- $force boolean
- $execute_sql_now boolean
boolean TTDate::setDateFormat(integer $date_format)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $date_format integer - EPOCH
boolean TTDate::setTimeFormat($time_format)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_format mixed
boolean TTDate::setTimeUnitFormat($time_unit_format)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_unit_format mixed
false|string TTDate::getTimeZoneOffset()
- Visibility: public
- This method is static.
- This method is defined by TTDate
mixed TTDate::convertTimeZone(integer $epoch, $timezone)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $timezone mixed
string TTDate::convertSecondsToHMS($seconds, boolean $include_seconds)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
- $include_seconds boolean
boolean|float|integer|\number|string TTDate::parseTimeUnit($time_unit, null $format)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_unit mixed
- $format null
boolean|integer|string TTDate::getTimeUnit($seconds, null $time_unit_format)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
- $time_unit_format null
boolean|false|integer|null TTDate::isValidDate($value)
Check to ensure that the date is within a validate integer range.
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $value mixed
boolean|false|integer|null TTDate::parseDateTime($str)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $str mixed
false|string TTDate::getHumanReadableDateStamp(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getISODateStamp(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getISOTimeStamp(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean|false|null|string TTDate::getAPIDate(string $format, integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $format string
- $epoch integer - EPOCH
false|string TTDate::getDBTimeStamp(integer $epoch, boolean $include_time_zone)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $include_time_zone boolean
boolean|false|null|string TTDate::getDate(null $format, integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $format null
- $epoch integer - EPOCH
array TTDate::getDayOfMonthArray()
- Visibility: public
- This method is static.
- This method is defined by TTDate
array|null TTDate::getMonthOfYearArray(boolean $short_name)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $short_name boolean
array|null TTDate::getDayOfWeekArray(boolean $translation)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $translation boolean
false|string TTDate::getDayOfWeek(integer $epoch, integer $start_week_day)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $start_week_day integer
boolean TTDate::getDayOfWeekName($dow)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $dow mixed
false|string TTDate::getDayOfYear(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean TTDate::getDayOfWeekByInt($int, boolean $translation)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $int mixed
- $translation boolean
array TTDate::getDayOfWeekArrayByStartWeekDay(integer $start_week_day)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_week_day integer
boolean TTDate::isMidnight(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean TTDate::doesRangeSpanMidnight(integer $start_epoch, integer $end_epoch, boolean $match_midnight)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
- $match_midnight boolean
boolean TTDate::doesRangeSpanDST(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
integer TTDate::getDSTOffset(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
integer TTDate::getTime()
- Visibility: public
- This method is static.
- This method is defined by TTDate
string TTDate::getSeconds($hours)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $hours mixed
string TTDate::getHours($seconds)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
string TTDate::getDays($seconds)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
string TTDate::getWeeks($seconds)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
string TTDate::getYears($seconds)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $seconds mixed
false|string TTDate::getDaysInMonth(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getDaysInYear(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::incrementDate(integer $epoch, $amount, $unit)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $amount mixed
- $unit mixed
mixed TTDate::snapTime(integer $epoch, integer $snap_to_epoch, $snap_type)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $snap_to_epoch integer - EPOCH
- $snap_type mixed
integer TTDate::roundTime(integer $epoch, $round_value, integer $round_type, integer $grace_time)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $round_value mixed
- $round_type integer
- $grace_time integer
mixed TTDate::graceTime(integer $current_epoch, $grace_time, integer $schedule_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $current_epoch integer - EPOCH
- $grace_time mixed
- $schedule_epoch integer - EPOCH
integer|mixed TTDate::getTimeStampFromSmarty($prefix, $array)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $prefix mixed
- $array mixed
integer|mixed TTDate::getTimeStamp(string $year, string $month, string $day, integer $hour, integer $min, integer $sec)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $year string
- $month string
- $day string
- $hour integer
- $min integer
- $sec integer
mixed TTDate::getDayWithMostTime(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
boolean|float|integer TTDate::getDayDifference(integer $start_epoch, integer $end_epoch, boolean $round)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
- $round boolean
boolean|float|integer TTDate::getWeekDifference(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
boolean|float|integer TTDate::getMonthDifference(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
boolean|float|integer TTDate::getYearDifference(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
false|integer TTDate::getDateByMonthOffset(integer $epoch, $month_offset)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $month_offset mixed
false|integer TTDate::getBeginMinuteEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getBeginDayEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getMiddleDayEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getEndDayEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getBeginMonthEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getEndMonthEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
mixed TTDate::getBeginQuarterEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
mixed TTDate::getEndQuarterEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getFiscalYearFromEpoch(integer $epoch, integer $offset)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $offset integer
false|integer TTDate::getBeginYearEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|integer TTDate::getEndYearEpoch(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean|mixed TTDate::getYearQuarterMonth(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean|mixed TTDate::getYearQuarterMonthNumber(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
float TTDate::getYearQuarter(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
array|boolean|mixed TTDate::getYearQuarters(integer $epoch, null $quarter, integer $day_of_month)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $quarter null
- $day_of_month integer
boolean|false|integer TTDate::getDateOfNextDayOfWeek(integer $anchor_epoch, integer $day_of_week_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $anchor_epoch integer - EPOCH
- $day_of_week_epoch integer - EPOCH
boolean|false|integer TTDate::getDateOfNextDayOfMonth(integer $anchor_epoch, integer $day_of_month_epoch, null $day_of_month)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $anchor_epoch integer - EPOCH
- $day_of_month_epoch integer - EPOCH
- $day_of_month null
false|integer|mixed TTDate::getDateOfNextQuarter($anchor_epoch, integer $day_of_month, integer $month_of_quarter)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $anchor_epoch mixed
- $day_of_month integer
- $month_of_quarter integer
boolean|false|integer TTDate::getDateOfNextYear(integer $anchor_epoch, integer $year_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $anchor_epoch integer - EPOCH
- $year_epoch integer - EPOCH
false|integer TTDate::getLastHireDateAnniversary(integer $hire_date)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $hire_date integer - EPOCH
false|integer TTDate::getBeginWeekEpoch(integer $epoch, integer $start_day_of_week)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $start_day_of_week integer
false|integer TTDate::getEndWeekEpoch(integer $epoch, integer $start_day_of_week)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $start_day_of_week integer
integer TTDate::getWeek(integer $epoch, integer $start_week_day)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $start_week_day integer
false|string TTDate::getYear(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getMonth(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean|mixed TTDate::getMonthName($month, boolean $short_name)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $month mixed
- $short_name boolean
false|string TTDate::getDayOfMonth(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getHour(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getMinute(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
false|string TTDate::getSecond(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
boolean TTDate::isWeekDay(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
integer TTDate::getAnnualWeekDays(integer $epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
integer TTDate::getNearestWeekDay(integer $epoch, integer $type, array $exclude_epochs)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $type integer
- $exclude_epochs array
array TTDate::getDateArray(integer $start_date, integer $end_date, boolean $day_of_week)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_date integer - EPOCH
- $end_date integer - EPOCH
- $day_of_week boolean
array|boolean TTDate::getCalendarArray(integer $start_date, integer $end_date, integer $start_day_of_week, boolean $force_weeks)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_date integer - EPOCH
- $end_date integer - EPOCH
- $start_day_of_week integer
- $force_weeks boolean
boolean TTDate::inWindow(integer $epoch, integer $window_epoch, $window)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
- $window_epoch integer - EPOCH
- $window mixed
boolean|mixed TTDate::getTimeOverLapDifference(integer $start_date1, integer $end_date1, integer $start_date2, integer $end_date2)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_date1 integer - EPOCH
- $end_date1 integer - EPOCH
- $start_date2 integer - EPOCH
- $end_date2 integer - EPOCH
array|boolean TTDate::getTimeOverLap(integer $start_date1, integer $end_date1, integer $start_date2, integer $end_date2)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_date1 integer - EPOCH
- $end_date1 integer - EPOCH
- $start_date2 integer - EPOCH
- $end_date2 integer - EPOCH
boolean TTDate::isTimeOverLap(integer $start_date1, integer $end_date1, integer $start_date2, integer $end_date2)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_date1 integer - EPOCH
- $end_date1 integer - EPOCH
- $start_date2 integer - EPOCH
- $end_date2 integer - EPOCH
array TTDate::calculateTimeOnEachDayBetweenRange(integer $start_epoch, integer $end_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_epoch integer - EPOCH
- $end_epoch integer - EPOCH
array TTDate::splitDateRangeAtMidnight(\time $start_time_stamp, \time $end_time_stamp, \time|boolean $filter_start_time_stamp, \time|boolean $filter_end_time_stamp)
break up a timespan into array of days between times and on midnight if no filter break days on midnight only
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $start_time_stamp time
- $end_time_stamp time
- $filter_start_time_stamp time|boolean
- $filter_end_time_stamp time|boolean
mixed TTDate::getNextDateFromArray(integer $floor, array $dates)
returns next date from array that is after the floor date
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $floor integer
- $dates array
boolean TTDate::isConsecutiveDays(integer $date_array)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $date_array integer - EPOCH
false|integer TTDate::getBirthDateAtAge(integer $birth_date, $age)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $birth_date integer - EPOCH
- $age mixed
false|integer TTDate::getTimeLockedDate(integer $time_epoch, integer $date_epoch)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_epoch integer - EPOCH
- $date_epoch integer - EPOCH
float TTDate::getEasterDays($year)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $year mixed
string TTDate::getHumanTimeSince(integer $epoch)
Function to return "13 mins ago" text from a given time.
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $epoch integer - EPOCH
integer TTDate::strtotime($str)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $str mixed
boolean TTDate::isBindTimeStamp($str)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $str mixed
array TTDate::getTimePeriodOptions(boolean $include_pay_period)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $include_pay_period boolean
array|boolean TTDate::getTimePeriodDates($time_period, integer $epoch, object $user_obj, null $params)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time_period mixed
- $epoch integer - EPOCH
- $user_obj object
- $params null
array TTDate::getReportDateOptions(null $column_name_prefix, null $column_name, null $sort_prefix, boolean $include_pay_period)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $column_name_prefix null
- $column_name null
- $sort_prefix null
- $include_pay_period boolean
array|boolean|false|null|string TTDate::getReportDates($column, integer $epoch, boolean $post_processing, object $user_obj, null $params)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $column mixed
- $epoch integer - EPOCH
- $post_processing boolean
- $user_obj object
- $params null
string TTDate::getISO8601Duration($time)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $time mixed
boolean TTDate::inApplyFrequencyWindow(integer $frequency_id, integer $start_date, integer $end_date, array $frequency_criteria)
- Visibility: public
- This method is static.
- This method is defined by TTDate
- $frequency_id integer
- $start_date integer - EPOCH
- $end_date integer - EPOCH
- $frequency_criteria array