Convert-Ethiopic
view release on metacpan or search on metacpan
lib/Convert/Ethiopic/Date.pm view on Meta::CPAN
my $self = shift;
my $formattted;
if ( $self->{calsys} eq "euro" ) {
my ( $day, $month ) = ( $self->getEuroDayOfWeek, $self->getEuroMonthName );
$formatted = "$day, $month $self->{date}, $self->{year}";
}
else {
my ( $day, $month, $year ) = $self->getDayMonthYearDayName;
$formatted = "$day£ $month $self->{date}";
$formatted .= ( $self->{langOut} == $tir )
? "áááá²"
: "áá",
;
$formatted .= $year;
$formatted .= ( $self->{year} > 0 )
? "á/á"
: "á/á "
;
}
$formatted;
}
sub getDayMonthYearDayName
{
my $self = shift;
my $n = new Convert::Ethiopic::Number ( $self->{year} );
my @result =
(
$self->getEthiopicDayOfWeek,
$self->getEthiopicMonthName,
$n->convert,
$self->getEthiopicDayName,
);
( wantarray ) ? @result : \@result;
}
#########################################################
# Do not change this, Do not put anything below this.
# File must return "true" value at termination
1;
##########################################################
__END__
=head1 NAME
Ethiopic::Time - conversions of calendar systems to/from Ethiopic and Gregorian.
=head1 SYNOPSIS
use LiveGeez::Request;
require Convert::Ethiopic::Time;
my $r = LiveGeez::Request->new;
ReadParse ( \%input );
$r->ParseInput ( \%input );
my $t = Convert::Ethiopic::Time->new ( $r );
$t->GregorianToEthiopic;
print "$t->{euDay}/$t->{euMonth}/$t->{euYear} = ";
print "$t->{etDay}/$t->{etMonth}/$t->{etYear}\n"
=head1 DESCRIPTION
Ethiopic::Time and Ethiopic::Cstocs are designed as interfaces to the methods in the
Ethiopic:: module and is oriented as services for the LiveGeez:: module. In this
version Ethiopic::Time expects to receive an object with hash elements using
the keys:
=over 4
=item 'calIn'
which can be "euro or "ethio".
=item 'date'
a comma separated list as "day,month,year".
=item 'LCInfo'
locale settings I<see the LibEth man pages>.
=back
These keys are set when using a LiveGeez::Request object as shown in the example.
=head1 AUTHOR
Daniel Yacob, L<LibEth@EthiopiaOnline.Net|mailto:LibEth@EthiopiaOnline.Net>
=head1 SEE ALSO
perl(1). LiveGeez(3), L<http://libeth.netpedia.net|http://libeth.netpedia.net>
=cut
( run in 1.200 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )