summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmdkapplet-extended-maintenance-helper12
-rw-r--r--mdkapplet_gui.pm14
2 files changed, 13 insertions, 13 deletions
diff --git a/mdkapplet-extended-maintenance-helper b/mdkapplet-extended-maintenance-helper
index 736ab935..4181381c 100755
--- a/mdkapplet-extended-maintenance-helper
+++ b/mdkapplet-extended-maintenance-helper
@@ -25,7 +25,6 @@ use lib qw(/usr/lib/libDrakX /usr/lib/libDrakX/drakfirsttime);
use standalone; # for explanations
use common;
use run_program;
-use DateTime;
BEGIN { unshift @::textdomains, 'mdkonline' }
@@ -73,17 +72,6 @@ sub get_extended_maintenance_data() {
@$current_apimdv_distro{qw(extended-maintenance extended-maintenance-end desktop-update-end basic-update-end)};
}
-sub iso8601_date_to_locale {
- my ($date) = @_;
- return $date if $date !~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/;
- my $dt = DateTime->new(year => $1, month => $2, day => $3);
- my $date1 = $dt->strftime("%x");
- # will fail on some locales (eg: br_FR, ...):
- eval { $dt->set_locale($ENV{LC_TIME}) };
- my $date2 = $dt->strftime("%x");
- $date2 || $date1;
-}
-
sub get_extmaint_authentication() {
my $w = ugtk2->new(N("Adding an additional package medium"), width => $width + 20);
my ($password_w, $email_w, $password);
diff --git a/mdkapplet_gui.pm b/mdkapplet_gui.pm
index 9509e969..cc416977 100644
--- a/mdkapplet_gui.pm
+++ b/mdkapplet_gui.pm
@@ -25,7 +25,7 @@ package mdkapplet_gui;
use strict;
use lib qw(/usr/lib/libDrakX);
use common;
-
+use DateTime;
our @ISA = qw(Exporter);
our @EXPORT = qw(
@@ -35,6 +35,7 @@ our @EXPORT = qw(
$localfile
$width
fill_n_run_portable_dialog
+ iso8601_date_to_locale
new_link_button
new_portable_dialog
setVar
@@ -122,3 +123,14 @@ sub setVar {
setVarsInSh($localfile, \%s);
read_local_config();
}
+
+sub iso8601_date_to_locale {
+ my ($date) = @_;
+ return $date if $date !~ /(\d\d\d\d)-?(\d\d)-?(\d\d)/;
+ my $dt = DateTime->new(year => $1, month => $2, day => $3);
+ my $date1 = $dt->strftime("%x");
+ # will fail on some locales (eg: br_FR, ...):
+ eval { $dt->set_locale($ENV{LC_TIME}) };
+ my $date2 = $dt->strftime("%x");
+ $date2 || $date1;
+}