Dave already replied while I was driving home so some replies maybe short. :)
I really like the new is_X subs, although in the case of the
No. :) I agree with Dave.
i.e. If I have aliased EST to America/New_York, could it return
America/New_York rather than 1? Both are true so it should be
Crap, my mail client crash and ate part of my reply.
I was considering a function to do this. If you look... I hid a solution in the
docs. :)
my $my_alias = %{ DateTime::TimeZone::Alias-aliases }-{ EST };
I didn't want a function named alias and another one named aliases. But - how
At 3:24 PM -1000 16/6/03, Joshua Hoblitt wrote:
There must be a way to express the same semantic
meaning with fewer lines of code
A slightly smaller version - specify days and hours
in the same constructor.
That is a bit clearer - although it's alot more code then I'd want
to inline in a
Hang on a second .. isn't this all a part of DateTime::Event::BusinessDay?
Maybe BusinessDay doesn't describe the functionality all that well then. :)
I want the overflow behavior for DT and DT::Duration objects that support scientific
time math. The second is the official unit of time in the SI system. So I'd like to
have a a class that supports 10^9 - 10^-9 seconds.
Possible names are:
DateTime::Wrapper::SI
DateTime::Wrapper::Units
I have actually been thinking about that a bit...
The way it is shaping up is that it will be a generic DT::SpanSet
wandering thing... So given a SpanSet (or Set, or Span) it will be
able to do operations within its context (i.e. date arithmetic,
etc.).
DT::E::BusinessDay would simply be a
-- Forwarded message --
Date: Tue, 17 Jun 2003 07:55:57 -0400
From: Ben Bennett [EMAIL PROTECTED]
To: Joshua Hoblitt [EMAIL PROTECTED]
Subject: Re: [announce] DateTime::TimeZone::Alias 0.01
On Mon, Jun 16, 2003 at 08:38:31PM -1000, Joshua Hoblitt wrote:
my $aliased_tz =
-- Forwarded message --
Date: Tue, 17 Jun 2003 07:57:07 -0400
From: Ben Bennett [EMAIL PROTECTED]
To: Joshua Hoblitt [EMAIL PROTECTED]
Subject: Re: [announce] DateTime::TimeZone::Alias 0.01
On Mon, Jun 16, 2003 at 08:28:47PM -1000, Joshua Hoblitt wrote:
This is largely a design
That isn't quite the same thing. The code I had in mind would need to
do:
--
my $dta = DateTime::TimeZone::Alias;
if ( not $dta-is_defined( EST ) ) {
$dta-add( EST = US/Eastern );
}
elsif ( ( $dta-is_alias(US/Eastern) and
$dta-value( EST ) eq $dta-value( US/Eastern )
On Tue, Jun 17, 2003 at 09:52:46AM -1000, Joshua Hoblitt wrote:
Btw - US/Eastern is defined as an alias unless you removed it earler in the program.
Yeah, that is why I have to jump through more hoops in my example.
How would an add method that returns silently if an alias is already
my $dta = DateTime::TimeZone::Alias;
$dta-remove(EST);# Start with a clean slate
$dta-add(EST = US/Eastern); # Succeeds
$dta-add(EST = US/Eastern); # Succeeds
$dta-add(EST = America/New_York); # Succeeds
$dta-add(EST = America/Chicago); # Fails
--
I know
What if I wanted to know inside a range of years which had a December 31st that was on
a Monday (or on a weekday)?
-J
--
Perhaps I'm not following closely enough, but this thread is confusing
me.
On Tuesday, June 17, 2003, at 02:51 PM, Ben Bennett wrote:
On Tue, Jun 17, 2003 at 09:52:46AM -1000, Joshua Hoblitt wrote:
How would an add method that returns silently if an alias is already
defined tell if an alias
Ok. It is your module so this is your call.
I disagree, but that is ok. This should end the thread.
-ben
On Tue, Jun 17, 2003 at 01:26:43PM -1000, Joshua Hoblitt wrote:
my $dta = DateTime::TimeZone::Alias;
$dta-remove(EST);# Start with a clean slate
Is that a generic business calculation or just an application of sets?
I think the latter. You can just make a set representing the
intersection of mondays (or weekdays) and Dec. 31sts. Then iterate
over it (using the restricted time range) to find the solution.
--
use strict;
use DateTime;
Is that a generic business calculation or just an application of sets?
I think the latter. You can just make a set representing the
intersection of mondays (or weekdays) and Dec. 31sts. Then iterate
over it (using the restricted time range) to find the solution.
I think your right -
This snippet just blew me away. That is just... beautiful.
--d
Ben Bennett wrote:
Is that a generic business calculation or just an application of sets?
I think the latter. You can just make a set representing the
intersection of mondays (or weekdays) and Dec. 31sts. Then iterate
over it
When do you think this will be ready? :)
-J
--
On Wed, 18 Jun 2003, Rick Measham wrote:
At 1:39 PM -1000 17/6/03, Joshua Hoblitt wrote:
What if I wanted to know inside a range of years which had a
December 31st that was on a Monday (or on a weekday)?
Maybe we need some module that
18 matches
Mail list logo