apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: I18N_DateTime

Source Location: /I18N-0.8.4/DateTime.php

Class Overview

PEAR
   |
   --I18N_Format
      |
      --I18N_DateTime



Variables

Methods


Inherited Variables

Inherited Methods

Class: I18N_Format

I18N_Format::I18N_Format()
I18N_Format::getFormat()
I18N_Format::setFormat()
define a custom format given by $format and return the $format-id the format-id can be used to call format( x , format-id ) to tell the method you want to use the format with that id

Class Details

[line 31]


[ Top ]


Class Variables

$days = array( 'Sunday' , 'Monday' , 'Tuesday' , 'Wednesday' , 'Thursday' , 'Friday' , 'Saturday' )

[line 45]


Type:   mixed


[ Top ]

$daysAbbreviated = array( 'Sun','Mon','Tue','Wed','Thu','Fri','Sat')

[line 47]


Type:   mixed


[ Top ]

$months = array(
                            'January',
                            'February',
                            'March',
                            'April',
                            'May',
                            'June',
                            'Juli',
                            'August',
                            'September',
                            'October',
                            'November',
                            'December'
                         )

[line 51]


Type:   mixed


[ Top ]

$monthsAbbreviated = array( 'Jan' , 'Feb' , 'Mar' , 'Apr' , 'May' , 'Jun' ,'Jul' , 'Aug' , 'Sep' , 'Oct' , 'Nov' , 'Dec' )

[line 49]


Type:   mixed


[ Top ]

$_locale =

[line 72]

this var contains the current locale this instace works with
  • Var: this is a string like 'de_DE' or 'en_US', etc.
  • Access: protected

Type:   string
Overrides:   Array


[ Top ]

$_localeObj =  null

[line 80]

the locale object which contains all the formatting specs
  • Access: protected

Type:   object
Overrides:   Array


[ Top ]



Method Detail

format   [line 101]

string format( [int $timestamp = null], [int $format = null])

returns the timestamp formatted according to the locale and the format-mode use this method to format a date and time timestamp
  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: setFormat()

Parameters:

int   $timestamp     a timestamp
int   $format     the formatting mode, using setFormat you can add custom formats

[ Top ]

formatDate   [line 118]

string formatDate( [int $timestamp = null], [int $format = null])

returns the timestamp formatted according to the locale and the format-mode use this method to get a formatted date only
  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: setDateFormat()

Parameters:

int   $timestamp     a timestamp
int   $format     the formatting mode, use setDateFormat to add custom formats

[ Top ]

formatDateDefault   [line 492]

string formatDateDefault( [int $timestamp = null])

convinience method, same as formatDate( $timestamp , I18N_DATETIME_DEFAULT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_DEFAULT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatDate()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateFull   [line 546]

string formatDateFull( [int $timestamp = null])

convinience method, same as formatDate( $timestamp , I18N_DATETIME_FULL )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_FULL

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatDate()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateLong   [line 528]

string formatDateLong( [int $timestamp = null])

convinience method, same as formatDate( $timestamp , I18N_DATETIME_LONG )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_LONG

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatDate()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateMedium   [line 510]

string formatDateMedium( [int $timestamp = null])

convinience method, same as formatDate( $timestamp , I18N_DATETIME_MEDIUM )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_MEDIUM

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatDate()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateShort   [line 474]

string formatDateShort( [int $timestamp = null])

convinience method, same as formatDate( $timestamp , I18N_DATETIME_SHORT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_SHORT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatDate()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDefault   [line 399]

string formatDefault( [int $timestamp = null])

convinience method, same as format( $timestamp , I18N_DATETIME_DEFAULT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_DEFAULT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: format()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatFull   [line 453]

string formatFull( [int $timestamp = null])

convinience method, same as format( $timestamp , I18N_DATETIME_FULL )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_FULL

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: format()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatLong   [line 435]

string formatLong( [int $timestamp = null])

convinience method, same as format( $timestamp , I18N_DATETIME_LONG )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_LONG

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: format()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatMedium   [line 417]

string formatMedium( [int $timestamp = null])

convinience method, same as format( $timestamp , I18N_DATETIME_MEDIUM )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_MEDIUM

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: format()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatShort   [line 381]

string formatShort( [int $timestamp = null])

convinience method, same as format( $timestamp , I18N_DATETIME_SHORT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_SHORT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: format()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTime   [line 135]

string formatTime( [int $timestamp = null], [int $format = null])

returns the timestamp formatted according to the locale and the format-mode use this method to get a formatted time only
  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: setTimeFormat()

Parameters:

int   $timestamp     a timestamp
int   $format     the formatting mode, use setTimeFormat to add custom formats

[ Top ]

formatTimeDefault   [line 586]

string formatTimeDefault( [int $timestamp = null])

convinience method, same as formatTime( $timestamp , I18N_DATETIME_DEFAULT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_DEFAULT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatTime()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeFull   [line 640]

string formatTimeFull( [int $timestamp = null])

convinience method, same as formatTime( $timestamp , I18N_DATETIME_FULL )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_FULL

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatTime()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeLong   [line 622]

string formatTimeLong( [int $timestamp = null])

convinience method, same as formatTime( $timestamp , I18N_DATETIME_LONG )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_LONG

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatTime()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeMedium   [line 604]

string formatTimeMedium( [int $timestamp = null])

convinience method, same as formatTime( $timestamp , I18N_DATETIME_MEDIUM )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_MEDIUM

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatTime()

Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeShort   [line 568]

string formatTimeShort( [int $timestamp = null])

convinience method, same as formatTime( $timestamp , I18N_DATETIME_SHORT )

this method exists, to have a shorter call to the method with a default format I18N_DATETIME_SHORT

  • Return: the formatted timestamp
  • Access: public
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/28
  • See: formatTime()

Parameters:

int   $timestamp     a timestamp

[ Top ]

getDateFormat   [line 317]

void getDateFormat( )


[ Top ]

getDayNames   [line 352]

void getDayNames( [mixed $abbreviated = false])


[ Top ]

getMonthName   [line 330]

void getMonthName( [mixed $which = null], [mixed $abbreviated = false])

get either the current or the given month name

[ Top ]

getMonthNames   [line 346]

void getMonthNames( [mixed $abbreviated = false])

get all month names for the current locale

get all month names for the current locale, fallback to english if not defined


[ Top ]

getTimeFormat   [line 321]

void getTimeFormat( )


[ Top ]

setDateFormat   [line 293]

int setDateFormat( [string $format = I18N_DATETIME_DEFAULT])

define a custom format given by $format and return the $format-id the format-id can be used to call formatDate( x , format-id ) to tell the method you want to use the format with that id
  • Return: the format-id, to be used with the format-method
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: formatDate()

Parameters:

string   $format     defines a custom format

[ Top ]

setFormat   [line 277]

int setFormat( [string $format = I18N_DATETIME_DEFAULT])

define a custom format given by $format and return the $format-id the format-id can be used to call format( x , format-id ) to tell the method you want to use the format with that id
  • Return: the format-id, to be used with the format-method
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: format()

Overrides I18N_Format::setFormat() (define a custom format given by $format and return the $format-id the format-id can be used to call format( x , format-id ) to tell the method you want to use the format with that id)

Parameters:

string   $format     defines a custom format

[ Top ]

setTimeFormat   [line 309]

int setTimeFormat( [string $format = I18N_DATETIME_DEFAULT])

define a custom format given by $format and return the $format-id the format-id can be used to call formatTime( x , format-id ) to tell the method you want to use the format with that id
  • Return: the format-id, to be used with the format-method
  • Author: Wolfram Kriesing <mailto:wolfram@kriesing.de>
  • Version: 02/11/20
  • See: formatTime()

Parameters:

string   $format     defines a custom format

[ Top ]


Documentation generated on Fri, 30 Apr 2004 21:59:09 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.