Subject: | Add 'it' locale |
Hi,
the attached patch implements the 'it' locale.
cheers,
Aldo
Subject: | 0001-Added-it-locale.patch |
From 73616f028e876af0142c01182aa6bd250bbfdd2e Mon Sep 17 00:00:00 2001
From: Aldo Calpini <dada@perl.it>
Date: Thu, 12 Apr 2012 10:35:38 +0200
Subject: [PATCH] Added 'it' locale
---
lib/DateTime/Format/Human/Duration.pm | 2 +-
lib/DateTime/Format/Human/Duration/Locale/it.pm | 33 +++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
create mode 100644 lib/DateTime/Format/Human/Duration/Locale/it.pm
diff --git a/lib/DateTime/Format/Human/Duration.pm b/lib/DateTime/Format/Human/Duration.pm
index c4a42ad..60052f1 100644
--- a/lib/DateTime/Format/Human/Duration.pm
+++ b/lib/DateTime/Format/Human/Duration.pm
@@ -223,7 +223,7 @@ This facilitates, for example, this L<Locale::Maketext> vernacular which becomes
Localization is provided by the included DateTime::Format::Human::Duration::Locale modules.
Included are DateTime::Format::Human::Duration::Locale::es, DateTime::Format::Human::Duration::Locale::fr, DateTime::Format::Human::Duration::Locale::pt,
-DateTime::Format::Human::Duration::Locale::de
+DateTime::Format::Human::Duration::Locale::de, DateTime::Format::Human::Duration::Locale::it
More will be included as time permits/folks volunteer/CLDR becomes an option
diff --git a/lib/DateTime/Format/Human/Duration/Locale/it.pm b/lib/DateTime/Format/Human/Duration/Locale/it.pm
new file mode 100644
index 0000000..51c0dd5
--- /dev/null
+++ b/lib/DateTime/Format/Human/Duration/Locale/it.pm
@@ -0,0 +1,33 @@
+package DateTime::Format::Human::Duration::Locale::it;
+
+use strict;
+use warnings;
+
+# 1 year, 1 month, 1 week, 1 day, 1 hour, 1 minute, 1 second, and 1 nanosecond
+# 2 years, 2 months, 2 weeks, 2 days, 2 hours, 2 minutes, 2 seconds, and 2 nanoseconds
+
+sub get_human_span_hashref {
+ return {
+ 'no_oxford_comma' => 1,
+ 'no_time' => 'zero secondi',
+ 'and' => 'e',
+ 'year' => 'anno',
+ 'years' => 'anni',
+ 'month' => 'mese',
+ 'months' => 'mesi',
+ 'week' => 'settimana',
+ 'weeks' => 'settimane',
+ 'day' => 'giorno',
+ 'days' => 'giorni',
+ 'hour' => 'ora',
+ 'hours' => 'ore',
+ 'minute' => 'minuto',
+ 'minutes' => 'minuti',
+ 'second' => 'secondo',
+ 'seconds' => 'secondi',
+ 'nanosecond' => 'nanosecondo',
+ 'nanoseconds' => 'nanosecondi',
+ };
+}
+
+1;
--
1.7.5.4