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

Class: I18N_DateTime

Source Location: /I18N-0.8.2b1/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( 'So','Mo','Di','Mi','Do','Fr','Sa')

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

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 ]

getDateFormat   [line 290]

void getDateFormat( )


[ Top ]

getTimeFormat   [line 294]

void getTimeFormat( )


[ Top ]

setDateFormat   [line 266]

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

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

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:51:31 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.