| [ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
TDateTimeStamp class file. COPYRIGHT (c) 2003-2005 John Lim and released under BSD-style license except for code by jackbbs, which includes getTimeStamp, getGMTDiff, isLeapYear and originally found at http://www.php.net/manual/en/function.mktime.php
| Author: | Wei Zhuo |
| Copyright: | Copyright © 2006 PradoSoft |
| License: | http://www.pradosoft.com/license/ |
| Version: | $Revision: 30/08/2006 $ |
| Poids: | 703 lignes (18 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
TDateTimeStamp:: (10 méthodes):
getDayofWeek()
isLeapYear()
digitCheck()
get4DigitYear()
getGMTDiff()
getDate()
_getDateInternal()
isValidDate()
formatDate()
getTimeStamp()
Classe: TDateTimeStamp - X-Ref
TDateTimeStamp Class| getDayofWeek($year, $month, $day) X-Ref |
| Gets day of week, 0 = Sunday,... 6=Saturday. Algorithm from PEAR::Date_Calc |
| isLeapYear($year) X-Ref |
| Checks for leap year, returns true if it is. No 2-digit year check. Also handles julian calendar correctly. param: float year to check return: boolean true if is leap year |
| digitCheck($y) X-Ref |
| Fix 2-digit years. Works for any century. Assumes that if 2-digit is more than 30 years in future, then previous century. return: integer change two digit year into multiple digits |
| get4DigitYear($y) X-Ref |
| Pas de description |
| getGMTDiff() X-Ref |
return: integer get local time zone offset from GMT |
| getDate($d=false,$fast=false) X-Ref |
return: array an array with date info. |
| _getDateInternal($origd=false,$fast=true,$is_gmt=false) X-Ref |
| Low-level function that returns the getdate() array. We have a special $fast flag, which if set to true, will return fewer array values, and is much faster as it does not calculate dow, etc. param: float orginal date param: boolean false to compute the day of the week, default is true param: boolean true to calculate the GMT dates return: array an array with date info. |
| isValidDate($y,$m,$d) X-Ref |
return: boolean true if valid date, semantic check only. |
| formatDate($fmt,$d=false,$is_gmt=false) X-Ref |
return: string formatted date based on timestamp $d |
| getTimeStamp($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_gmt=false) X-Ref |
| Not a very fast algorithm - O(n) operation. Could be optimized to O(1). return: integer|float a timestamp given a local time. Originally by jackbbs. |
| Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |