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

Class: I18Nv2_Locale

Source Location: /I18Nv2-0.1.0/Locale.php

Class Overview


I18Nv2_Locale


Author(s):

Version:

  • $Revision: 1.4 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 44]
I18Nv2_Locale


[ Top ]


Method Detail

I18Nv2_Locale (Constructor)   [line 72]

object I18Nv2_Locale( [string $locale = null])

Constructor
  • Access: public

Parameters:

string   $locale     

[ Top ]

date   [line 476]

string date( [int $timestamp = null])

Locale date
  • Access: public

Parameters:

int   $timestamp     

[ Top ]

dayName   [line 491]

mixed dayName( int $weekday, [bool $short = false])

Day name
  • Return: Returns &type.string; name of weekday on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $weekday     numerical representation of weekday (0 = Sunday, 1 = Monday, ...)
bool   $short     whether to return the abbreviation

[ Top ]

formatCurrency   [line 379]

string formatCurrency( numeric $value)

Format currency (incomplete)
  • Access: public

Parameters:

numeric   $value     

[ Top ]

formatDate   [line 438]

string formatDate( [int $timestamp = null])

Format a date
  • Access: public

Parameters:

int   $timestamp     

[ Top ]

formatNumber   [line 425]

string formatNumber( numeric $value)

Format a number
  • Access: public

Parameters:

numeric   $value     

[ Top ]

formatTime   [line 451]

string formatTime( [int $timestamp = null])

Format a time
  • Access: public

Parameters:

int   $timestamp     

[ Top ]

initialize   [line 112]

void initialize( )

Initialize
  • Access: public

[ Top ]

loadExtension   [line 224]

bool loadExtension( )

Loads corresponding locale extension
  • Access: public

[ Top ]

monthName   [line 516]

mixed monthName( int $month, [bool $short = false])

Month name
  • Return: Returns &type.string; name of month on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $month     numerical representation of month (0 = January, 1 = February, ...)
bool   $short     whether to return the abbreviation

[ Top ]

setCurrencyFormat   [line 259]

mixed setCurrencyFormat( int $format, [bool $custom = false])

Set currency format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format     a I18Nv2_CURRENCY constant
bool   $custom     whether to use a defined custom format

[ Top ]

setCustomFormat   [line 359]

void setCustomFormat( [mixed $type = null], [mixed $format = null])

Set custom format

If $format is omitted, the custom format for $type will be dsicarded - if both vars are omitted all custom formats will be discarded.

  • Access: public

Parameters:

mixed   $type     
mixed   $format     

[ Top ]

setDateFormat   [line 307]

mixed setDateFormat( int $format, [bool $custom = false])

Set date format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format     a I18Nv2_DATETIME constant
bool   $custom     whether to use a defined custom format

[ Top ]

setDefaults   [line 243]

void setDefaults( )

Set defaults
  • Access: public

[ Top ]

setLocale   [line 96]

mixed setLocale( string $locale)

Set locale

This automatically calls I18Nv2_Locale::initialize()

  • Access: public

Parameters:

string   $locale     

[ Top ]

setNumberFormat   [line 283]

mixed setNumberFormat( int $format, [bool $custom = false])

Set number format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format     a I18Nv2_NUMBER constant
bool   $custom     whether to use a defined custom format

[ Top ]

setTimeFormat   [line 331]

void setTimeFormat( int $format, [bool $custom = false])

Set time format
  • Access: public

Parameters:

int   $format     a I18Nv2_DATETIME constant
bool   $custom     whether to use a defined custom format

[ Top ]

time   [line 464]

string time( [int $timestamp = null])

Locale time
  • Access: public

Parameters:

int   $timestamp     

[ Top ]

__construct   [line 82]

object __construct( [string $locale = null])

  • Access: public

Parameters:

string   $locale     

[ Top ]


Documentation generated on Sat, 1 May 2004 03:25:20 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.