Package DE_EPAGES::Core::API::Object::DateTimeFormatter
Formatter and parser for locale-dependent time and date strings. Based on DateTime::Format::Strptime.
Example |
my $Formatter = DE_EPAGES::Core::API::Object::DateTimeFormatter->new( locale => 'de_DE', ); my $Date = $Formatter->parse_datetime( 'Donnerstag, 7. Oktober 2004', 'date' ); my $String = $Formatter->format_datetime( $Date, 'date', 'long' ); |
Functions
formatString
returns formats string for parse_datetime and format_datetime
Syntax |
$FormatString = $Formatter->formatString($type, $formattype); |
Input |
|
Return |
|
format_datetime
Formats the value
Syntax |
$FormattedDateTime = $Formatter->format_datetime($value, $type, $formattype); |
Input |
|
Return |
|
new
Creates a formatter for dates and/or time strings.
Syntax |
$Formatter = DE_EPAGES::Core::API::Object::DateTimeFormatter->new(%options); |
Input |
|
Return |
|
parse_datetime
Return the internal value of a formatted value.
Syntax |
$Value = $Formatter->parse_datetime($FormattedDateTime, $type, $formattype); |
Input |
|
Return |
|