From c838b396b1564f574234781b19463566a95e9404 Mon Sep 17 00:00:00 2001 From: tetragon Date: Sat, 19 May 2007 22:00:01 +0000 Subject: Documentation update for $locale->date git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1216 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Locale.pm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'LedgerSMB/Locale.pm') diff --git a/LedgerSMB/Locale.pm b/LedgerSMB/Locale.pm index 8773cb56..80b3446f 100644 --- a/LedgerSMB/Locale.pm +++ b/LedgerSMB/Locale.pm @@ -12,17 +12,24 @@ Locale support module for LedgerSMB. Uses Locale::Maketext::Lexicon as a base. =over =item get_handle ($language_code) + Returns a locale handle for accessing the other methods. Inherited from Locale::Maketext. =item text ($string) + Returns the translation for the given string. This is a legacy wrapper that merely calls $self->maketext. =item date ($myconfig, $date, $longformat) -Returns the given date after formatting it. If $longformat is set, the date -will be givin in the form of "_('September') 23 2007". If $longformat is not -set, the date will be output in the format specified by $myconfig->{dateformat}. + +Returns the given date after formatting it. $longformat is a ternary flag that +determines how the date is formatted. If $longformat is true, the date will be +given in the form of "_('September') 23 2007". If $longformat is false but +defined, the date will be in the form of "_('Sep') 23 2007" unless the date is +given in the form 'yyyy.mm.dd', in which case it is returned as-is. If +$longformat is not defined, the date will be output in the format specified by +$myconfig->{dateformat}. =back @@ -66,6 +73,7 @@ set, the date will be output in the format specified by $myconfig->{dateformat}. =cut package LedgerSMB::Locale; + use base 'Locale::Maketext'; use Locale::Maketext::Lexicon; use Encode; -- cgit v1.2.3