| [ Index ] |
krapohl.info |
[Source view] [Print]
(no description)
| File Size: | 1579 lines (48 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
Date_Calc:: (48 methods):
dateNow()
isValidDate()
isLeapYear()
isFutureDate()
isPastDate()
dayOfWeek()
weekOfYear()
julianDate()
quarterOfYear()
beginOfNextMonth()
endOfNextMonth()
beginOfPrevMonth()
endOfPrevMonth()
nextWeekday()
prevWeekday()
nextDayOfWeek()
prevDayOfWeek()
nextDayOfWeekOnOrAfter()
prevDayOfWeekOnOrBefore()
nextDay()
prevDay()
defaultCentury()
dateDiff()
daysInMonth()
weeksInMonth()
firstOfMonthWeekday()
beginOfMonth()
beginOfWeek()
endOfWeek()
beginOfNextWeek()
beginOfPrevWeek()
getCalendarWeek()
getCalendarMonth()
getCalendarYear()
dateToDays()
daysToDate()
NWeekdayOfMonth()
dateFormat()
getYear()
getMonth()
getDay()
getMonthFullname()
getMonthAbbrname()
getWeekdayFullname()
getWeekdayAbbrname()
getMonthFromFullName()
getMonthNames()
getWeekDays()
| dateNow($format="%Y%m%d") X-Ref |
| Returns the current local date. NOTE: This function retrieves the local date using strftime(), which may or may not be 32-bit safe on your system. param: string the strftime() format to return the date return: string the current date in specified format |
| isValidDate($day, $month, $year) X-Ref |
| Returns true for valid date, false for invalid date. param: string year in format CCYY param: string month in format MM param: string day in format DD return: boolean true/false |
| isLeapYear($year="") X-Ref |
| No description |
| isFutureDate($day,$month,$year) X-Ref |
| Determines if given date is a future date from now. param: string year in format CCYY param: string month in format MM param: string day in format DD return: boolean true/false |
| isPastDate($day,$month,$year) X-Ref |
| Determines if given date is a past date from now. param: string year in format CCYY param: string month in format MM param: string day in format DD return: boolean true/false |
| dayOfWeek($day="",$month="",$year="") X-Ref |
| Returns day of week for given date, 0=Sunday param: string year in format CCYY, default is current local year param: string month in format MM, default is current local month param: string day in format DD, default is current local day return: int $weekday_number |
| weekOfYear($day,$month,$year) X-Ref |
| Returns week of the year, first Sunday is first day of first week param: string day in format DD param: string month in format MM param: string year in format CCYY return: integer $week_number |
| julianDate($day="",$month="",$year="") X-Ref |
| Returns number of days since 31 December of year before given date. param: string year in format CCYY, default is current local year param: string month in format MM, default is current local month param: string day in format DD, default is current local day return: int $julian |
| quarterOfYear($day="",$month="",$year="") X-Ref |
| Returns quarter of the year for given date param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day return: int $year_quarter |
| beginOfNextMonth($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of begin of next month of given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| endOfNextMonth($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the last day of next month of given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| beginOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the first day of previous month of given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| endOfPrevMonth($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the last day of previous month for given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| nextWeekday($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the next weekday of given date, skipping from Friday to Monday. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| prevWeekday($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the previous weekday, skipping from Monday to Friday. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| nextDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrAfter=false) X-Ref |
| Returns date of the next specific day of the week from the given date. param: int day of week, 0=Sunday param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: boolean onOrAfter if true and days are same, returns current day param: string format for returned date return: string date in given format |
| prevDayOfWeek($dow,$day="",$month="",$year="",$format="%Y%m%d",$onOrBefore=false) X-Ref |
| Returns date of the previous specific day of the week from the given date. param: int day of week, 0=Sunday param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: boolean onOrBefore if true and days are same, returns current day param: string format for returned date return: string date in given format |
| nextDayOfWeekOnOrAfter($dow,$day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the next specific day of the week on or before the given date. param: int day of week, 0=Sunday param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| prevDayOfWeekOnOrBefore($dow,$day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of the previous specific day of the week on or before the given date. param: int day of week, 0=Sunday param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| nextDay($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of day after given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| prevDay($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Returns date of day before given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| defaultCentury($year) X-Ref |
| Sets century for 2 digit year. 51-99 is 19, else 20 param: string 2 digit year return: string 4 digit year |
| dateDiff($day1,$month1,$year1,$day2,$month2,$year2) X-Ref |
| Returns number of days between two given dates. param: string year in format CCYY param: string month in format MM param: string day in format DD param: string year in format CCYY param: string month in format MM param: string day in format DD return: int absolute number of days between dates, |
| daysInMonth($month="",$year="") X-Ref |
| Find the number of days in the given month. param: string month in format MM, default current local month return: int number of days |
| weeksInMonth($month="",$year="") X-Ref |
| Returns the number of rows on a calendar month. Useful for determining the number of rows when displaying a typical month calendar. param: string month in format MM, default current local month param: string year in format YYCC, default current local year return: int number of weeks |
| firstOfMonthWeekday($month="",$year="") X-Ref |
| Find the day of the week for the first of the month of given date. param: string year in format CCYY, default to current local year param: string month in format MM, default to current local month return: int number of weekday for the first day, 0=Sunday |
| beginOfMonth($month="",$year="",$format="%Y%m%d") X-Ref |
| Return date of first day of month of given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string format for returned date return: string date in given format |
| beginOfWeek($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Find the month day of the beginning of week for given date, using DATE_CALC_BEGIN_WEEKDAY. (can return weekday of prev month.) param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| endOfWeek($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Find the month day of the end of week for given date, using DATE_CALC_BEGIN_WEEKDAY. (can return weekday of following month.) param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| beginOfNextWeek($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Find the month day of the beginning of week after given date, using DATE_CALC_BEGIN_WEEKDAY. (can return weekday of prev month.) param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| beginOfPrevWeek($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Find the month day of the beginning of week before given date, using DATE_CALC_BEGIN_WEEKDAY. (can return weekday of prev month.) param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: string date in given format |
| getCalendarWeek($day="",$month="",$year="",$format="%Y%m%d") X-Ref |
| Return an array with days in week param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: string format for returned date return: array $week[$weekday] |
| getCalendarMonth($month="",$year="",$format="%Y%m%d") X-Ref |
| Return a set of arrays to construct a calendar month for the given date. param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string format for returned date return: array $month[$row][$col] |
| getCalendarYear($year="",$format="%Y%m%d") X-Ref |
| Return a set of arrays to construct a calendar year for the given date. param: string year in format CCYY, default current local year param: string format for returned date return: array $year[$month][$row][$col] |
| dateToDays($day,$month,$year) X-Ref |
| Converts a date to number of days since a distant unspecified epoch. param: string year in format CCYY param: string month in format MM param: string day in format DD return: integer number of days |
| daysToDate($days,$format="%Y%m%d") X-Ref |
| Converts number of days to a distant unspecified epoch. param: int number of days param: string format for returned date return: string date in specified format |
| NWeekdayOfMonth($occurance,$dayOfWeek,$month,$year,$format="%Y%m%d") X-Ref |
| Calculates the date of the Nth weekday of the month, such as the second Saturday of January 2000. param: string occurance: 1=first, 2=second, 3=third, etc. param: string dayOfWeek: 0=Sunday, 1=Monday, etc. param: string year in format CCYY param: string month in format MM param: string format for returned date return: string date in given format |
| dateFormat($day,$month,$year,$format) X-Ref |
| Formats the date in the given format, much like strfmt(). This function is used to alleviate the problem with 32-bit numbers for dates pre 1970 or post 2038, as strfmt() has on most systems. Most of the formatting options are compatible. formatting options: %a abbreviated weekday name (Sun, Mon, Tue) %A full weekday name (Sunday, Monday, Tuesday) %b abbreviated month name (Jan, Feb, Mar) %B full month name (January, February, March) %d day of month (range 00 to 31) %e day of month, single digit (range 0 to 31) %E number of days since unspecified epoch (integer) (%E is useful for passing a date in a URL as an integer value. Then simply use daysToDate() to convert back to a date.) %j day of year (range 001 to 366) %m month as decimal number (range 1 to 12) %n newline character (\n) %t tab character (\t) %w weekday as decimal (0 = Sunday) %U week number of current year, first sunday as first week %y year as decimal (range 00 to 99) %Y year as decimal including century (range 0000 to 9999) %% literal '%' param: string year in format CCYY param: string month in format MM param: string day in format DD param: string format for returned date return: string date in given format |
| getYear() X-Ref |
| Returns the current local year in format CCYY return: string year in format CCYY |
| getMonth() X-Ref |
| Returns the current local month in format MM return: string month in format MM |
| getDay() X-Ref |
| Returns the current local day in format DD return: string day in format DD |
| getMonthFullname($month) X-Ref |
| Returns the full month name for the given month param: string month in format MM return: string full month name |
| getMonthAbbrname($month,$length=3) X-Ref |
| Returns the abbreviated month name for the given month param: string month in format MM param: int optional length of abbreviation, default is 3 return: string abbreviated month name |
| getWeekdayFullname($day="",$month="",$year="") X-Ref |
| Returns the full weekday name for the given date param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day return: string full month name |
| getWeekdayAbbrname($day="",$month="",$year="",$length=3) X-Ref |
| Returns the abbreviated weekday name for the given date param: string year in format CCYY, default current local year param: string month in format MM, default current local month param: string day in format DD, default current local day param: int optional length of abbreviation, default is 3 return: string full month name |
| getMonthFromFullName($month) X-Ref |
| Returns the numeric month from the month name or an abreviation Both August and Aug would return 8. Month name is case insensitive. param: string month name return: integer month number |
| getMonthNames() X-Ref |
| Retunrs an array of month names Used to take advantage of the setlocale function to return language specific month names. XXX cache values to some global array to avoid preformace hits when called more than once. returns: array An array of month names |
| getWeekDays() X-Ref |
| Returns an array of week days Used to take advantage of the setlocale function to return language specific week days XXX cache values to some global array to avoid preformace hits when called more than once. returns: array An array of week day names |
| Generated: Wed Feb 16 22:40:07 2005 | Cross-referenced by PHPXref 0.6 |