RE: Formatting dates for locales/time zones

2006-03-21 Thread Bruce Van Allen
On 3/21/06 Garrett, Philip (MAN-Corporate) wrote: So is cloning really the only way to do this? Dave Rolsky answered: I'm afraid so. But that's what the clone api is for. I'm not sure why you're averse to it, it's actually implemented in a way that should be quite fast. My aversion is more

Re: Is it ok to use zero-but-true?

2005-01-20 Thread Bruce Van Allen
On 2005-01-20 [EMAIL PROTECTED] wrote: DT::Set count() currently returns undef on error, and 0 for empty sets. Should it return zero-but-true (0e0) for empty sets? I use 0e0 (or '0 but true') in lots of cases where an empty set is a valid return value, where zero is a valid index, and where zero

Re: Problems with (and patch for) February 30th in t/006_locales.t in DateTime::Format::Strptime 1.06

2004-09-01 Thread Bruce Van Allen
On 8/31/04 Dave Rolsky wrote: On Tue, 31 Aug 2004, Rick Measham wrote: At 9:33 am -0700 2004-08-30, Jonathan Leffler wrote: It looks like the test is trying to use February 30th. My impression is that the problem is in the test, not the module being tested. Dave, this looks more like an

Re: localtime DateTime Objects

2004-07-01 Thread Bruce Van Allen
On 7/2/04 Rick Measham wrote: DateTime-now() returns a UTC time unless given a time zone. On the other hand, DateTime-new() returns the local time zone unless otherwise instructed. Dave, can you enlighten me as to why this is the case? Shouldn't all constructors that don't have a time_zone

Re: Re: DT::Duration overloads

2004-06-10 Thread Bruce Van Allen
On 6/11/04 Rick Measham wrote: On Thu, 10 Jun 2004 [EMAIL PROTECTED] wrote: How about a DateTime::Span-midpoint method? On 11 Jun 2004, at 6:55 AM, Dave Rolsky replied: Let's wait and see if others ask for it. For now, let's just add those recipes to the faq. I'm not sure of the best

Re: RFC: API for DateTime::Business:Week (was Re: Time Delta)

2003-10-03 Thread Bruce Van Allen
On 2003-10-03 Dave Rolsky wrote: I see us needing a couple things: - Recording the fact that certain days are special non-work days. This includes both public holidays, company holidays, one shot things like fumigating the building, etc. We not only want to record when these are, but their

RE: figuring out the number of sundays in a given year

2003-09-20 Thread Bruce Van Allen
On 9/20/03 Joshua Hoblitt wrote: I'm not sure about the count in a year, but I frequently need to determine how many of a given day of the week fall in a given month of the year, or, more precisely, given that today is Saturday, September 20, I need to figure out whether today is the first,

Re: UTC FAQ for DT

2003-07-17 Thread Bruce Van Allen
On Thursday, July 17, 2003 Flavio S. Glock wrote: Bruce Van Allen wrote: UTC is widely used in scientific and technical contexts, and is increasingly accepted as the standard time scale for civic and business uses. s/civic/civil/ ? ++ - Flavio S. Glock Yes, s/civic/civil/ . Thanks

Re: DateTime parse(), parser()

2003-07-14 Thread Bruce Van Allen
On Monday, July 14, 2003 John Peacock wrote: John Siracusa wrote: Great, but the $64K question is: do we then get parse() and parser() methods in DateTime, which default to use DT::F::Simple? :) A while ago, when this discussion last reared its [ugly] head, I suggested that the base class

Re: DateTime::Duration nits...

2003-06-30 Thread Bruce Van Allen
On Tuesday, July 1, 2003 [EMAIL PROTECTED] wrote: Why not: $dur1 = new DT::Dur( days = 2 ); $dur2 = new DT::Dur( months = 1 ); $dur3 = $dur1 - $dur2; $dur3-add( days = 3 ); If you add $dur3 to a date, it would add 2 days and subtract a month, then add 3 days again. This is not too difficult to

Re: Getting different results from DateTime and Manip for epoch time

2003-06-23 Thread Bruce Van Allen
On Sunday, June 22, 2003 [EMAIL PROTECTED] wrote: I'll try to rephrase this, because it would be good to have it in the FAQ. If somebody can explain it better, or more correctly, please help me! How's this: What time scale does DateTime follow? What's up with UTC, GMT, TAI, and UT1? The

Re: Getting different results from DateTime and Manip for epoch time

2003-06-23 Thread Bruce Van Allen
On Tuesday, June 24, 2003 [EMAIL PROTECTED] wrote: Bruce Van Allen wrote: How's this: ... Before UTC, other time scales were in use, including: Maybe: There are other time scales, such as: because some are still in use (?) Good point. I was trying to convey something about the progression

Re: Standalone Times?

2003-06-22 Thread Bruce Van Allen
On Sunday, June 22, 2003 Dave Rolsky wrote: On Sat, 21 Jun 2003, Bruce Van Allen wrote: The point of DT::Format::XXX is parsing and formatting: - to return a DT object if given an XXX-formatted date/time string; and - to return an XXX-formatted string from a DT object. Well, the formats can

Re: Standalone Times?

2003-06-22 Thread Bruce Van Allen
On Sunday, June 22, 2003 Eugene van der Pijll wrote: Bruce Van Allen schreef: From a string in the form MM, the DT::F::ISO8601 parser should return a DT object identical to the DateTime object instantiated from $dt = DateTime-new( year = 2003, month = 6

Re: DT::Fiscal::Year

2003-06-22 Thread Bruce Van Allen
On Sunday, June 22, 2003 Jesse Shy wrote: OK, I am coding up the port from Date::Calc::Fiscal right now. Yay. The DT project advances into a new continent of usefulness! It will have only 2 methods right now, day_fiscal_year - if Mar 1 is fiscal start, then Mar 1 is day 1 not 59;

Re: Business Dates

2003-06-21 Thread Bruce Van Allen
Hi All: [This was already written when Dave posted his latest comment: While I know that DateTime::Business stuff will eventually probably get really complicated, I think starting off with one simple implementation just to get the ball rolling is a good idea. If people need something different,

RE: ISO 8601 is eeeevil!

2003-06-19 Thread Bruce Van Allen
On Thursday, June 19, 2003 Jerry Wilcox wrote: At 4:25 PM +0200 6/19/03, Peter J. Acklam wrote: Anyway, I see your point, but I don't agree. There is only need for an agreement when ambiguous formats are used, which is a good thing since ambiguous date formats are, as everyone here knows, a big

Re: [announce] DateTime::TimeZone::Alias 0.01 (fwd)

2003-06-17 Thread Bruce Van Allen
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

Re: Nanoseconds in the FAQ.

2003-06-11 Thread Bruce Van Allen
On Wednesday, June 11, 2003, at 07:08 PM, Ben Bennett wrote: I added a section on nanoseconds: The raw POD is below. =head3 How small an increment of time can I represent? ADateTime can represent nanoseconds. You can create obects with =for example begin # The ns part is 0.00230 below

Re: What should a business module implement?

2003-06-06 Thread Bruce Van Allen
On Thursday, June 5, 2003, at 01:38 PM, Ben Bennett wrote: Very interesting post. On Thu, Jun 05, 2003 at 01:32:14PM -0700, Brad Hughes wrote: Ben Bennett wrote: Okay so what should a business date module be able to do? What is a business day? A quick glance at our internal date modules reveals

Re: What should a business module implement?

2003-06-06 Thread Bruce Van Allen
On Thursday, June 5, 2003, at 04:39 PM, [EMAIL PROTECTED] wrote: Bruce Van Allen wrote: 1. This is one reason some us have argued for the capability of caching recurrence sets (which Flavio implemented!). I'm not done yet - but I've got it started. Sorry, what I meant was -- Flavio has agreed

Re: Rough first draft of a FAQ

2003-05-30 Thread Bruce Van Allen
On Thursday, May 29, 2003, at 09:39 PM, Rick Measham wrote: Looking through the FAQ (thanks Ben!), the question about comparisons is raised. Clearly DT-now is only == to DT-today for one nanosecond. Maybe we should add a routine such as the following to the core? sub same {

Re: date math and local times

2003-03-11 Thread Bruce Van Allen
On Monday, March 10, 2003, at 04:26 PM, Dave Rolsky wrote: my $dt = DateTime-new( year = 2003, month = 4, day = 5, hour = 2, time_zone = 'America/Chicago', $dt-add( days = 1 ); then the code will throw an exception, because there is no local 2:00 AM on 2003-04-06 in

Re: DateTime bug default timezone

2003-03-01 Thread Bruce Van Allen
On Saturday, March 1, 2003, at 07:21 AM, [EMAIL PROTECTED] wrote: I'd say that the same applies .. add one month: 01:00 26 January 2003 + 1 month = 01:00 26 February 2003 01:00 26 February 2003 + 2 months = 01:00 26 April 2003 On Friday, February 28, 2003, at 10:56 PM, Dave Rolsky wrote: Hmm,

Re: Floating time zone = non-floating

2003-02-02 Thread Bruce Van Allen
On Sunday, February 2, 2003, at 02:42 PM, Dave Rolsky wrote: On Sun, 2 Feb 2003, Dave Rolsky wrote: If I have a datetime object with a floating time zone and then I set the time zone to some non-floating zone, I shouldn't change the local time, right? And how about non-floating =

Re: Changing time zones?

2003-01-30 Thread Bruce Van Allen
On Thursday, January 30, 2003, at 05:19 PM, Dave Rolsky wrote: What should happen when someone does this: my $dt = ...; $dt-set( time_zone = 'America/Denver' ); and the new time zone is different from the old? There's two ways to do this. One is to keep the UTC time the same, which

Re: The first day of the week is ...

2003-01-15 Thread Bruce Van Allen
On Tuesday, January 14, 2003, at 02:24 PM, Antonios Christofides wrote: Dave Rolsky wrote: Monday! How exciting. I figured I might as well just pick something, and so I picked Monday. There were a lot of excellent candidates, and Friday's performance was excellent, but overall Monday best

Re: Base object API/semantics

2003-01-11 Thread Bruce Van Allen
On Friday, January 10, 2003, at 09:52 PM, Dave Rolsky wrote: Can we simply declare 0-based as the standard for day of week and day of year, and 1-based for day of month, month of year, and week of year. FWIW, that's what Date::ICal already had implemented, I believe. Alternately, how about

Re: [mplspm]: Picking up the ball

2003-01-09 Thread Bruce Van Allen
On Thursday, January 9, 2003, at 04:35 PM, Dave Rolsky wrote: On Thu, 9 Jan 2003, Chris Josephes wrote: Why not just a DateTime object, like we already have a CGI object? I suppose that's possible too. I think the one thing the [EMAIL PROTECTED] cabal dislikes more than a new top-level

Re: Namespace changes

2001-08-20 Thread Bruce Van Allen
At 7:09 PM -0400 8/20/01, Rich Bowen wrote: OK, just making sure that I had the support of a few folks. Remember, I'm the one that proposed the change in the first place, so I still think it's a good idea. Mostly, I just have not had time. So it seems, then, that the sentiment is still for this