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

Class: I18N_DateTime

Source Location: /I18N-0.8.5/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 35]


[ Top ]


Class Variables

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

[line 49]


Type:   mixed


[ Top ]

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

[line 51]


Type:   mixed


[ Top ]

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

[line 55]


Type:   mixed


[ Top ]

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

[line 53]


Type:   mixed


[ Top ]

$_locale =

[line 76]

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 84]

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

Type:   object
Overrides:   Array


[ Top ]



Method Detail

format   [line 105]

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

Parameters:

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

[ Top ]

formatDate   [line 122]

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

Parameters:

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

[ Top ]

formatDateDefault   [line 496]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateFull   [line 550]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateLong   [line 532]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateMedium   [line 514]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDateShort   [line 478]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatDefault   [line 403]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatFull   [line 457]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatLong   [line 439]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatMedium   [line 421]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatShort   [line 385]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTime   [line 139]

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

Parameters:

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

[ Top ]

formatTimeDefault   [line 590]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeFull   [line 644]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeLong   [line 626]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeMedium   [line 608]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

formatTimeShort   [line 572]

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


Parameters:

int   $timestamp     a timestamp

[ Top ]

getDateFormat   [line 321]

void getDateFormat( )


[ Top ]

getDayNames   [line 356]

void getDayNames( [mixed $abbreviated = false])


[ Top ]

getMonthName   [line 334]

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

get either the current or the given month name

[ Top ]

getMonthNames   [line 350]

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 325]

void getTimeFormat( )


[ Top ]

setDateFormat   [line 297]

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

Parameters:

string   $format     defines a custom format

[ Top ]

setFormat   [line 281]

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

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 313]

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

Parameters:

string   $format     defines a custom format

[ Top ]


Documentation generated on Fri, 30 Apr 2004 22:55:53 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.