From a218ab581baaab7ae472981f2a8dbfaaf7d6806c Mon Sep 17 00:00:00 2001 From: Tom Browder Date: Fri, 9 Feb 2024 17:36:57 -0600 Subject: [PATCH] save work --- Changes | 1 + META6.json | 2 +- dev/run.raku | 5 +++++ lib/DateTime/US.rakumod | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 99d764f..6119f2b 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for DateTime-US {{$NEXT}} - Add new method to provide DST begin/end DateTimes for a year and US timezone + 0.1.2 2024-01-28T20:50:39-06:00 - Add 3-OS tests diff --git a/META6.json b/META6.json index 216b15e..a7d77f4 100644 --- a/META6.json +++ b/META6.json @@ -6,6 +6,7 @@ "build-depends": [ ], "depends": [ + "Date::Utils", "Timezones::US" ], "description": "Provides time zone and Daylight Saving Time (DST) infomation for US states and territories", @@ -22,7 +23,6 @@ "time date us zones dst" ], "test-depends": [ - "Test", "IO::Capture::Simple" ], "version": "0.1.2" diff --git a/dev/run.raku b/dev/run.raku index 5964642..51394f6 100755 --- a/dev/run.raku +++ b/dev/run.raku @@ -4,6 +4,11 @@ use lib <../lib>; use DateTime::US; my $tz = DateTime::US.new: :timezone('cst'); +dd $tz; + +say $tz.begin-dst; + +=finish =begin comment my $lt-format = sub ($self) { diff --git a/lib/DateTime/US.rakumod b/lib/DateTime/US.rakumod index 4389583..e5a7a1f 100644 --- a/lib/DateTime/US.rakumod +++ b/lib/DateTime/US.rakumod @@ -1,6 +1,7 @@ unit class DateTime::US; use Timezones::US; +use Date::Utils; has $.timezone is required; has $.name; @@ -74,7 +75,6 @@ Update the DST (daylight savings time) module with the desired year multi method dst-begin(:$year --> DateTime) { # nth(2) dow(7) in month 3 at 0200 local my $date = Date.new: :$year, :month(3); - } multi method dst-end(:$year --> DateTime) {