| [ Index ] |
|
Code source de LifeType 1.2.4 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 1736 lignes (56 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 1 fois |
| Nécessite: | 0 fichiers |
Date_Calc:: (10 méthodes):
dateNow()
isValidDate()
isLeapYear()
dayOfWeek()
nextDay()
prevDay()
daysInMonth()
dateToDays()
daysToDate()
dateFormat()
| 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 |
| Pas de description |
| dayOfWeek($day='',$month='',$year='') X-Ref |
| Returns day of week for given date, 0=Sunday param: string day in format DD, default is current local day param: string month in format MM, default is current local month param: string year in format CCYY, default is current local year return: int $weekday_number |
| nextDay($day='',$month='',$year='',$format='%Y%m%d') X-Ref |
| Returns date of day after given date. param: string day in format DD, default is current local day param: string month in format MM, default is current local month param: string year in format CCYY, default is current local year param: string format for returned date return: string date in given format |
| prevDay($day='',$month='',$year='',$format='%Y%m%d') X-Ref |
| Pas de description |
| daysInMonth($month='',$year='') X-Ref |
| Pas de description |
| dateToDays($day,$month,$year) X-Ref |
| Converts a date to number of days since a distant unspecified epoch. param: string day in format DD param: string month in format MM param: string year in format CCYY 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 |
| 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 day in format DD param: string month in format MM param: string year in format CCYY param: string format for returned date return: string date in given format |
| Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
|