\CalendarDateManager
Copyright (c) 2017 Insite Apps - http://www.insiteapps.co.za All rights reserved.
- Author: Patrick Chitovoro <patrick@insiteapps.co.za> Redistribution and use in source and binary forms, with or without modification, are NOT permitted at all. There is no freedom to share or change it this file.
Synopsis
class CalendarDateManager
extends CalendarTimeManager
{
- // Inherited constants from CalendarTimeManager
- const SECOND = 0;
- const MINUTE = 1;
- const HOUR = 2;
- const DAY = 3;
- const WEEK = 4;
- const MONTH = 5;
- const QUARTER = 6;
- const YEAR = 7;
- const DECADE = 8;
- const CENTURY = 9;
- const MILLENIUM = 10;
- const SUNDAY = 0;
- const MONDAY = 1;
- const TUESDAY = 2;
- const WEDNESDAY = 3;
- const THURSDAY = 4;
- const FRIDAY = 5;
- const SATURDAY = 6;
- const JANUARY = 1;
- const FEBRUARY = 2;
- const MARCH = 3;
- const APRIL = 4;
- const MAY = 5;
- const JUNE = 6;
- const JULY = 7;
- const AUGUST = 8;
- const SEPTEMBER = 9;
- const OCTOBER = 10;
- const NOVEMBER = 11;
- const DECEMBER = 12;
- // methods
- public static sfDate getInstance()
- public void __construct()
- public string format()
- public string date()
- public string datetime()
- public string dump()
- public int retrieve()
- public timestamp get()
- public sfDate set()
- public sfDate reset()
- public int cmp()
- public void diff()
- public sfDate __call()
- public static void isValid()
- private static void isDateValid()
- public static void currentTime()
- public static void currentDateTime()
- public static void phpTimeToMySQLDateTime()
- public static void phpTimeToMySQLTime()
- public static void phpTimeToMySQLTimeQuoted()
- public static void calendarDateToPHPDate()
- public static void calendarDateToMySQLDate()
- public static void calendarDateToMySQLDateQuoted()
- public static void addDaysToDate()
- public static void mysqlDateToPHPDate()
- public static void mysqlDateToCalendarDate()
- public static void SSDateToBritishShortDate()
- public static void mysqlDateToNiceDate()
- public static void mysqlDateToNiceDateOnly()
- public static void mysqlDateToNiceDateWithFullTextOnly()
- public static void phpTimeToNiceDateFormat()
- public static void monthFromTime()
- public static void mysqlTimeToNiceTime()
- public static void getSSTimeStr()
- public static void getTimeStr()
- public static void ssDateToPHPDate()
- public static void getDayStr()
- public static void geDateRange()
- public void isFirstDayOfTheMonth()
- public static void isLastDayOfTheMonth()
- public static void isWeekend()
- public static void isDateOnWeekend()
- public static void formatedDate()
- public static bool InFuture()
- // Inherited methods from CalendarTimeManager
- public static timestamp add()
- public static timestamp subtract()
- public static timestamp clearTime()
- public static timestamp clearDate()
- public static timestamp clearSecond()
- public static timestamp clearMinute()
- public static timestamp clearHour()
- public static timestamp setSecond()
- public static timestamp setMinute()
- public static timestamp setHour()
- public static timestamp setDay()
- public static timestamp setMonth()
- public static timestamp setYear()
- public static timestamp tomorrow()
- public static timestamp yesterday()
- public static timestamp addSecond()
- public static timestamp subtractSecond()
- public static timestamp addMinute()
- public static timestamp subtractMinute()
- public static timestamp addHour()
- public static timestamp subtractHour()
- public static timestamp addDay()
- public static timestamp subtractDay()
- public static timestamp addWeek()
- public static timestamp subtractWeek()
- public static timestamp addMonth()
- public static timestamp subtractMonth()
- public static timestamp addQuarter()
- public static timestamp subtractQuarter()
- public static timestamp addYear()
- public static timestamp subtractYear()
- public static timestamp addDecade()
- public static timestamp subtractDecade()
- public static timestamp addCentury()
- public static timestamp subtractCentury()
- public static timestamp addMillenium()
- public static timestamp subtractMillenium()
- public static timestamp firstDayOfWeek()
- public static timestamp finalDayOfWeek()
- public static timestamp firstDayOfMonth()
- public static timestamp finalDayOfMonth()
- public static timestamp firstDayOfQuarter()
- public static timestamp finalDayOfQuarter()
- public static timestamp firstDayOfYear()
- public static timestamp finalDayOfYear()
- public static timestamp nextDay()
- public static timestamp previousDay()
- public static timestamp nextMonth()
- public static timestamp previousMonth()
Hierarchy
Extends
Constants
Name | Value |
---|---|
SECOND | 0 |
MINUTE | 1 |
HOUR | 2 |
DAY | 3 |
WEEK | 4 |
MONTH | 5 |
QUARTER | 6 |
YEAR | 7 |
DECADE | 8 |
CENTURY | 9 |
MILLENIUM | 10 |
SUNDAY | 0 |
MONDAY | 1 |
TUESDAY | 2 |
WEDNESDAY | 3 |
THURSDAY | 4 |
FRIDAY | 5 |
SATURDAY | 6 |
JANUARY | 1 |
FEBRUARY | 2 |
MARCH | 3 |
APRIL | 4 |
MAY | 5 |
JUNE | 6 |
JULY | 7 |
AUGUST | 8 |
SEPTEMBER | 9 |
OCTOBER | 10 |
NOVEMBER | 11 |
DECEMBER | 12 |
Members
private
-
$init
The original timestamp for this sfDate instance. -
$ts
The timestamp for this sfDate instance.
Methods
private
public
- __construct() — Construct an sfDate object.
- InFuture()
- SSDateToBritishShortDate()
- __call() — Call any function available in the sfTime library, but without the ts parameter.
- addDaysToDate()
- calendarDateToMySQLDate()
- calendarDateToMySQLDateQuoted()
- calendarDateToPHPDate()
- cmp() — Compares two date values.
- currentDateTime()
- currentTime()
- date() — Formats the date according to the <code>format_date</code> helper of the Date helper group.
- datetime() — Formats the date according to the <code>format_datetime</code> helper of the Date helper group.
- diff() — Gets the difference of two date values in seconds.
- dump() — Format the date as a datetime value.
- format() — Format the date according to the <code>date</code> function.
- formatedDate()
- geDateRange()
- get() — Retrieve the timestamp value of this sfDate instance.
- getDayStr()
- getInstance() — Retrieves a new instance of this class.
- getSSTimeStr()
- getTimeStr()
- isDateOnWeekend()
- isFirstDayOfTheMonth()
- isLastDayOfTheMonth()
- isValid()
- isWeekend()
- monthFromTime()
- mysqlDateToCalendarDate()
- mysqlDateToNiceDate()
- mysqlDateToNiceDateOnly()
- mysqlDateToNiceDateWithFullTextOnly()
- mysqlDateToPHPDate()
- mysqlTimeToNiceTime()
- phpTimeToMySQLDateTime()
- phpTimeToMySQLTime()
- phpTimeToMySQLTimeQuoted()
- phpTimeToNiceDateFormat()
- reset() — Resets the timestamp value of this sfDate instance to its original value.
- retrieve() — Retrieves the given unit of time from the timestamp.
- set() — Sets the timestamp value of this sfDate instance.
- ssDateToPHPDate()
Inherited from CalendarTimeManager
public
- add() — Adds the specified number of given units of time to the given date.
- addCentury() — Adds the specified number of centuries to the timestamp.
- addDay() — Adds the specified number of days to the timestamp.
- addDecade() — Adds the specified number of decades to the timestamp.
- addHour() — Adds the specified number of hours to the timestamp.
- addMillenium() — Adds the specified number of millenia to the timestamp.
- addMinute() — Adds the specified number of minutes to the timestamp.
- addMonth() — Adds the specified number of months to the timestamp.
- addQuarter() — Adds the specified number of quarters to the timestamp.
- addSecond() — Adds the specified number of seconds to the timestamp.
- addWeek() — Adds the specified number of weeks to the timestamp.
- addYear() — Adds the specified number of years to the timestamp.
- clearDate() — Returns the timestamp with the time of day but without the date.
- clearHour() — Clear the hour value of this timestamp.
- clearMinute() — Clear the minute value of this timestamp.
- clearSecond() — Clear the second value of this timestamp.
- clearTime() — Returns the timestamp with the date but without the time of day.
- finalDayOfMonth() — Returns the timestamp for last day of the month for the given date.
- finalDayOfQuarter() — Returns the timestamp for last day of the quarter for the given date.
- finalDayOfWeek() — Returns the timestamp for last day of the week for the given date.
- finalDayOfYear() — Returns the timestamp for last day of the year for the given date.
- firstDayOfMonth() — Returns the timestamp for first day of the month for the given date.
- firstDayOfQuarter() — Returns the timestamp for first day of thequarter for the given date.
- firstDayOfWeek() — Returns the timestamp for first day of the week for the given date.
- firstDayOfYear() — Returns the timestamp for first day of the year for the given date.
- nextDay() — Returns the timestamp for the next occurance of [day].
- nextMonth() — Returns the timestamp for the next occurance of [month].
- previousDay() — Returns the timestamp for the most recent (previous) occurance of [day].
- previousMonth() — Returns the timestamp for the most recent (previous) occurance of [month].
- setDay() — Set the day value of this timestamp.
- setHour() — Set the hour value of this timestamp.
- setMinute() — Set the minute value of this timestamp.
- setMonth() — Set the month value of this timestamp.
- setSecond() — Set the second value of this timestamp.
- setYear() — Set the year value of this timestamp.
- subtract() — Subtracts the specified number of given units of time from the given date.
- subtractCentury() — Subtracts the specified number of centuries from the timestamp.
- subtractDay() — Subtracts the specified number of days from the timestamp.
- subtractDecade() — Subtracts the specified number of decades from the timestamp.
- subtractHour() — Subtracts the specified number of hours from the timestamp.
- subtractMillenium() — Subtracts the specified number of millenia from the timestamp.
- subtractMinute() — Subtracts the specified number of minutes from the timestamp.
- subtractMonth() — Subtracts the specified number of months from the timestamp.
- subtractQuarter() — Subtracts the specified number of quarters from the timestamp.
- subtractSecond() — Subtracts the specified number of seconds from the timestamp.
- subtractWeek() — Subtracts the specified number of weeks from the timestamp.
- subtractYear() — Subtracts the specified number of years from the timestamp.
- tomorrow() — Returns the timestamp for tomorrow.
- yesterday() — Returns the timestamp for yesterday.