Class Mage_Core_Model_Date

Description

Date conversion model

Located in /Core/Model/Date.php (line 33)


	
			
Method Summary
Mage_Core_Model_Date __construct ()
int calculateOffset ([string $timezone = null])
void checkDateTime ( $year,  $month,  $day, [ $hour = 0], [ $minute = 0], [ $second = 0])
string date ([string $format = null], [int|string $input = null])
int getGmtOffset ([string $type = 'seconds'])
string gmtDate ([string $format = null], [int|string $input = null])
int gmtTimestamp ([int|string $input = null])
void parseDateTime ( $dateTimeString,  $dateTimeFormat)
int timestamp ([int|string $input = null])
string _getConfigTimezone ()
Methods
Constructor __construct (line 53)

Init offset

  • access: public
Mage_Core_Model_Date __construct ()
calculateOffset (line 75)

Calculates timezone offset

  • return: offset between timezone and gmt
  • access: public
int calculateOffset ([string $timezone = null])
  • string $timezone
checkDateTime (line 207)

Deprecated since 1.1.7

  • access: public
void checkDateTime ( $year,  $month,  $day, [ $hour = 0], [ $minute = 0], [ $second = 0])
  • $year
  • $month
  • $day
  • $hour
  • $minute
  • $second
date (line 121)

Converts input date into date with timezone offset Input date must be in GMT timezone

  • access: public
string date ([string $format = null], [int|string $input = null])
  • string $format
  • int|string $input: date in GMT timezone
getGmtOffset (line 185)

Get current timezone offset in seconds/minutes/hours

  • access: public
int getGmtOffset ([string $type = 'seconds'])
  • string $type
gmtDate (line 103)

Forms GMT date

  • access: public
string gmtDate ([string $format = null], [int|string $input = null])
  • string $format
  • int|string $input: date in current timezone
gmtTimestamp (line 137)

Forms GMT timestamp

  • access: public
int gmtTimestamp ([int|string $input = null])
  • int|string $input: date in current timezone
parseDateTime (line 224)

Deprecated since 1.1.7

  • access: public
void parseDateTime ( $dateTimeString,  $dateTimeFormat)
  • $dateTimeString
  • $dateTimeFormat
timestamp (line 162)

Converts input date into timestamp with timezone offset Input date must be in GMT timezone

  • access: public
int timestamp ([int|string $input = null])
  • int|string $input: date in GMT timezone
_getConfigTimezone (line 64)

Gets the store config timezone

  • access: protected
string _getConfigTimezone ()

Documentation generated on Fri, 11 Feb 2011 17:00:46 +0200 by phpDocumentor 1.4.3