X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/4aded4e8dae01257d3d835251b9ae7c2d7c8a767..78034f2431414b414d171b720bc0438635e19ae5:/SL/DB/Helpers/AttrDate.pm diff --git a/SL/DB/Helpers/AttrDate.pm b/SL/DB/Helpers/AttrDate.pm deleted file mode 100644 index 38d5696fd..000000000 --- a/SL/DB/Helpers/AttrDate.pm +++ /dev/null @@ -1,38 +0,0 @@ -package SL::DB::Helpers::AttrDate; - -use strict; - -use Carp; -use English; - -sub define { - my $package = shift; - my $attribute = shift; - my %params = @_; - - no strict 'refs'; - *{ $package . '::' . $attribute . '_as_date' } = sub { - my ($self, $string) = @_; - - if (@_ > 1) { - if ($string) { - my ($yy, $mm, $dd) = $::locale->parse_date(\%::myconfig, $string); - $self->$attribute(DateTime->new(year => $yy, month => $mm, day => $dd)); - } else { - $self->$attribute(undef); - } - } - - return $self->$attribute - ? $::locale->reformat_date( - { dateformat => 'yy-mm-dd' }, - $self->${attribute}->ymd, - $::myconfig{dateformat} - ) - : undef; - }; - - return 1; -} - -1;