Re: The week (or so) in review

2003-01-16 Thread Joshua Hoblitt
- added strftime (which may move to a separate module, but it works) Just out of curiosity does this add a dependence on POSIX.pm? -J

Re: The week (or so) in review

2003-01-17 Thread Joshua Hoblitt
- added strftime (which may move to a separate module, but it works) Just out of curiosity does this add a dependence on POSIX.pm? No. It's a pure Perl implementation loosely based on Graham Barr's in Date::Format. Sounds good - now if SF was only working...

Re: DateTime in XS

2003-02-14 Thread Joshua Hoblitt
I've started reimplementing some of the core math in XS. If people want to review the C code and tell me how it sucks, that'd be cool ;) Are you planning on requiring XS for DT or also maintaining a pure Perl implementation? -J

Re: ANNOUNCE: DateTime::Format::MySQL 0.01

2003-03-19 Thread Joshua Hoblitt
This formats and parses MySQL date and time related data types. I had actually started working on this Sunday and got side tracked after implementing just the Mysql Datetime format. :) It seems like theres going to be a lot of almost identical modules Format::ICal, Format::W3CDTF, etc. That

Re: ANNOUNCE: DateTime::Format::MySQL 0.01

2003-03-19 Thread Joshua Hoblitt
I like it. Need a formatter too though. e.g. strftime = %c strftime = sub { shift-datetime } I think we can come up with a better name then strftime. Maybe keep it around as an alias for historical reasons? I like the the strftime style syntax though. -J __

Re: Generic and multi parsers (was: ANNOUNCE: DateTime::Format::MySQL 0.01)

2003-03-20 Thread Joshua Hoblitt
The 15 is the string length. In this example, taken from the iCal format module, it checks the string length and parses based on that, since there are several valid iCal formats each of which is distinguishable based on length. Yeah. I got that =) I was just wondering what the

Re: Generic and multi parsers

2003-03-20 Thread Joshua Hoblitt
Ok. As I've currently got it: - $class-create_parser(...) This creates a parser coderef. Straight forward so far. Now, the parameters make it more fun: If given a hash: create_parser( params = \%params, regex = qr// ); Then we assume it's a single format

Re: Announce: DateTime::Format::Builder 0.22 (pre)

2003-03-20 Thread Joshua Hoblitt
On Fri, 21 Mar 2003, Iain 'Spoon' Truskett wrote: Morning all, Wander over to http://perl.dellah.org/modules/ You wrote that in a couple of hours??? and have a look at DateTime::Format::Builder. It's not finished. The docs need work, it needs more tests, and it's missing some

Re: Announce: DateTime::Format::Builder 0.22 (pre)

2003-03-20 Thread Joshua Hoblitt
I like it. Though it will be: parsers = { parse_datetime = [ specs ], parse_date = [ specs ], }, as I'm dropping hash form. Though it would be accepting: parse_datetime = { spec }, aka parse_datetime = specref, My original suggestion was an

MySQL input formats [was Re: ANNOUNCE: DateTime 0.08]

2003-03-20 Thread Joshua Hoblitt
Btw - Sorry about the subject line. Actually, I think maybe a doc patch is in order instead. The goal of the parse_* methods is to parse things returned _by MySQL_ as a result of queries, not to parse any format that MySQL itself might accept. Aww, thats not the asumption I was working

Re: MySQL input formats [was Re: ANNOUNCE: DateTime 0.08]

2003-03-21 Thread Joshua Hoblitt
I honestly don't see the point. I'm not trying to write code for use by MySQL itself ;) I just want to provide something that makes interfacing with MySQL easier. I often accept input, modify it some how (offsets, etc), and then pass it on to MySQL. It is totally reasonable to accept the

Re: MySQL input formats [was Re: ANNOUNCE: DateTime 0.08]

2003-03-21 Thread Joshua Hoblitt
My general feeling (without looking at the relevant code to closely) is that this should go into a MySQL-specific module. The core should be kept small and fast (I have no use for MySQL dates and speed is important). DateTime::Format::MySQL isn't a MySQL specific module? :)

Re: MySQL input formats [was Re: ANNOUNCE: DateTime 0.08]

2003-03-24 Thread Joshua Hoblitt
On Fri, 21 Mar 2003, Dave Rolsky wrote: On Fri, 21 Mar 2003, Joshua Hoblitt wrote: I honestly don't see the point. I'm not trying to write code for use by MySQL itself ;) I just want to provide something that makes interfacing with MySQL easier. I often accept input, modify

Re: Request for DateTime API addition: today() constructor

2003-03-24 Thread Joshua Hoblitt
On Mon, 24 Mar 2003, Tim Bunce wrote: On Sun, Mar 23, 2003 at 08:35:49PM +, Rich wrote: Rick Measham wrote: my $today = DateTime-now; $today-truncate(to = day); From memory, this would work for you .. I can't test it here: $today = DateTime-now-truncate(to = day);

Re: MySQL input formats [was Re: ANNOUNCE: DateTime 0.08]

2003-03-24 Thread Joshua Hoblitt
If you want something like Date::Manip, how about writing Date::Parse::General or something like that, which would parse many different date formats (kind of like Graham Barr's Date::Parse or HTTP::Date, or Date::Manip itself)? Now that you've given me the idea I'll look into getting

quick benchmarks DT vs. Date::Manip

2003-03-24 Thread Joshua Hoblitt
Speaking of Date::Manip. :) -- #!/usr/bin/env perl use strict; use warnings; use DateTime; use DateTime::Format::MySQL; use Date::Manip (); use Benchmark qw(cmpthese); print Compare dates\n; cmpthese( -5, { DateTime = sub { my $dt1 = DateTime-now();

Re: Announce: DateTime::Format::Builder 0.24 (release)

2003-03-24 Thread Joshua Hoblitt
You'll find it at your local CPAN eventually, in the CVS now, and also at http://perl.dellah.org/modules/ right now. I synced my mirror a bit early so it's there for the CPAN inpatient. http://mirror.cpan.org/showmirror.cgi?name=aniani.ifa.hawaii.edu -J --

Re: quick benchmarks DT vs. Date::Manip

2003-03-24 Thread Joshua Hoblitt
And this could be sped up. Move making the duration object out of the sub, and make it like this: I was trying to be fair and not preserve information between runs. Of course in the real world... my $dt_dur = DateTime::Duration-new( days = -4 ); and inside the sub call add_duration

Re: quick benchmarks DT vs. Date::Manip

2003-03-25 Thread Joshua Hoblitt
The reason I'm not sure it belongs in the docs is that it may be better as part of the upcoming FAQ. Or maybe a DateTime::Cookbook? -J --

Re: ICal and timezones

2003-03-26 Thread Joshua Hoblitt
Index: lib/DateTime/Format/ICal.pm === RCS file: /cvsroot/perl-date-time/modules/DateTime-Format-ICal/lib/DateTime/Format/ICal.pm,v retrieving revision 1.6 diff -u -r1.6 ICal.pm --- lib/DateTime/Format/ICal.pm 16 Feb

Re: ICal and timezones

2003-03-26 Thread Joshua Hoblitt
A warn/carp perhaps. Even so, though. I don't see why my parser needs to know anything about the formatter (it was given the input in good faith and happily parsed it), or why I should wrap my formatter to make sure things like '-0500' get 'normalized', while letting through other things.

Re: Request for DateTime API addition: today() constructor

2003-03-26 Thread Joshua Hoblitt
Why not have the constructors take any timezone as an argument? -now( 'utc' ) or -now( timezone = 'local' ) or even -now( timezone = 'floating' ) If no arguments are specified you get still get UTC. You could, but I like the simplicity and clarity for these common

datetime.perl.org

2003-03-26 Thread Joshua Hoblitt
It would be nice to have a link the sourceforge cvs or the cvs viewer from datetime.perl.org/developer/. http://sourceforge.net/cvs/?group_id=17187 and/or http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/perl-date-time/ Cheers, -J --

Re: Request for DateTime API addition: today() constructor

2003-03-26 Thread Joshua Hoblitt
yeah, but then we're bordering on a truly ridiculous number of constructors, most of which are just syntactic sugar. I'm afraid I'm going to go with Joshua's suggestion on this one. It feels right because the other constructors already take a time_zone parameter, so this one should too. So

Re: ICal and timezones

2003-03-28 Thread Joshua Hoblitt
Speaking as an end user! I think that a module should either a) do what the user expects or b) die because it's not possible to do exactly what the user asked for. As I said I don't think turning -0600 into UTC is reasonably what the user asked for. Depends. Did they want output with

Re: ICal and timezones

2003-03-28 Thread Joshua Hoblitt
I think that depends on what the format is used for. With iCal, which is focused on calendaring, it makes sense that it's okay to lose the specific time zone, as long as the UTC time is correct. Normalizing to UTC sounds a lot better then just tacking it on to fulfill the TZ requirement.

Re: Announce: DateTime-Format-Builder 0.25

2003-03-31 Thread Joshua Hoblitt
[From Builder.pm .25] A sample preprocessor (taken from DateTime::Format::ICal) looks like this: my $add_tz = sub { my %args = @_; my ($date, $p) = @args{qw( input parsed )}; . . . Iain, I started

Re: DateTime and Holidays

2003-04-01 Thread Joshua Hoblitt
On Tue, 1 Apr 2003, Dave Rolsky wrote: On Tue, 1 Apr 2003, Joshua Hoblitt wrote: In Hawaii we have several extra state holidays that are observed: March, 26 - Prince Jonah Kuhio Kalanianaole Day June, 11 - King Kamehameha I Day August, 15 - Statehood Day What name space should

DT::Calendar::Mayan::* ?

2003-04-01 Thread Joshua Hoblitt
I got a copy of Calendrical Calculations yesterday and have just about finished the Mayan/Long count calendar. Should the Haab and Tzolkin calendars be in the same module (ick!) or am I better off with: DateTime::Calendar::Mayan::LongCount DateTime::Calendar::Mayan::Haab

Re: DT::Calendar::Mayan::* ?

2003-04-02 Thread Joshua Hoblitt
I got a copy of Calendrical Calculations yesterday and have just about finished the Mayan/Long count calendar. Should the Haab and Tzolkin calendars be in the same module (ick!) I'd think so. You can't really have a separate Haab calendar, as a Haab date contains only month and day; no

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-03 Thread Joshua Hoblitt
- what other methods would be useful? Offhand, -set(), -add(), -subtract(), accessors for each component (baktun, katun, etc.) -set_baktun or -set( baktun = ... ) ? Should DT::Duration objects be supported? Why does from_object take a language parameter? Cut and paste-o? It's not being

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-03 Thread Joshua Hoblitt
Wrong answer #1: print DateTime::Calendar::Mayan-now-date; This prints the Mayan date corresponding to the UTC date, which can be different from the local date. (Which can't be helped, as the local timezone isn't mentioned.) Wrong answer #2: print

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-03 Thread Joshua Hoblitt
2) If you want to use the Mayan calendar *now*, as a replacement for the Gregorian calendar, you also need a time system. And 'our' system is the only sensible candidate. (Unless the Mayan time system is known?) You lost me on the you also need a time system. Why? If you want to

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-03 Thread Joshua Hoblitt
Wrong answer #2: print DateTime::Calendar::Mayan-from_object( object = DateTime-now(time_zone = 'Europe/Amsterdam') ); So you are proposing something like this? print DateTime::Calendar::Mayan-now( timezone = 'Europe/Amsterdam' )-date; Either that, or your

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-04 Thread Joshua Hoblitt
13.0.0.0.0 == 0.0.0.0.0 . Except that 0 isn't used on the baktun level, so that it stays 13 until 13.19.19.17.19. The day after that is 1.0.0.0.0. Date::Maya uses: $results [0] %= $max_baktun; $results [0] = $max_baktun if $results [0] == 0; I guess thats safes for RD values before the

Re: [ANNOUNCE]([kinda) DateTime::Calendar::Mayan

2003-04-04 Thread Joshua Hoblitt
I don't know what you mean by 'RD values'. Rata Die That's my interpretation of what the calendar FAQ writes about Mayan calendars. I'm not an expert on Mayan calendars, about all I know of it, I got from the calendar FAQ. Unfortunately the CC book doesn't cover this at all. I might try to

DateTime::Duration, length of a month?

2003-04-04 Thread Joshua Hoblitt
When converting a DateTime::Duration month to days - how many days should it be considering equivalent too? 30? 30.4? 31? -J --

[PATCH] DT::Language alternate namespaces

2003-05-30 Thread Joshua Hoblitt
Dave, Here is a small patch to allow arbitrary namespaces to be passed to DT::Language. This is useful for modules that want to include their own DT::Language subclasses or want to generate information at runtime. Cheers, -J -- Index: lib/DateTime/Language.pm

Re: [PATCH] DT::Language alternate namespaces

2003-05-30 Thread Joshua Hoblitt
I just realized that won't allow you specify a top level namespace. Probably not an issue for most people. hmmm... -J -- On Thu, 29 May 2003, Joshua Hoblitt wrote: Dave, Here is a small patch to allow arbitrary namespaces to be passed to DT::Language. This is useful for modules

Re: [PATCH] DT::Language alternate namespaces

2003-05-30 Thread Joshua Hoblitt
Uh, they could just call it DT::Language::MyLanguage, right? Do we really want people including DT::Language::* modules in there distributions? Anyway, I want DT::Language to go away soon in favor of DT::Locale. I know - but it's not here yet. :) -J --

Re: [PATCH] DT::Language alternate namespaces

2003-05-30 Thread Joshua Hoblitt
On Fri, 30 May 2003, Iain Truskett wrote: * Joshua Hoblitt ([EMAIL PROTECTED]) [30 May 2003 10:20]: I just realized that won't allow you specify a top level namespace. Probably not an issue for most people. hmmm... More of an issue is that it doesn't complain when one tries. It just

Re: Request for DateTime API addition: today() constructor

2003-03-25 Thread Joshua Hoblitt
On Tue, 25 Mar 2003, Tim Bunce wrote: On Mon, Mar 24, 2003 at 06:59:17PM -0600, Dave Rolsky wrote: On Mon, 24 Mar 2003, Joshua Hoblitt wrote: True. Though it'll be so commonly used I think it deserves a constructor. Ditto. It would also be nice if it defaults to current TZ instead

Converting to DT

2003-06-09 Thread Joshua Hoblitt
I just got back from Perl Whirl. Having spent most of the last week plugging DT as a replacement for many of the examples given in the talks, I think we need a converting to DT section in the FAQ or a separate document dedicated to this. For example (I saw this in many presentations ): use

Re: datetime-namespace.pod

2003-06-10 Thread Joshua Hoblitt
Added a missing head tag. -J -- On Mon, 9 Jun 2003, Joshua Hoblitt wrote: Here is the document I started that lists the DT namespaces. It's been just sitting on my disk for several weeks so I figure I might as well get it finished. It's pretty short on details - although I don't think

Re: Converting to DT

2003-06-10 Thread Joshua Hoblitt
FAQ answers should answer more questions then they generate, but two obvious questions leap out of that code... 1. Why is set_time_zone() needed for this DateTime example? Good point - that should be added to the description. 2. Why use DateTime::Format::*MySQL* when the code may have

Re: Converting to DT

2003-06-10 Thread Joshua Hoblitt
I am working on that. I decided to use Parse::RecDescent as a base. I have a working ISO8601 (is http://www.w3.org/TR/NOTE-datetime complete?) and I have it parsing simple dates and times... That document isn't anywhere close to what is defined by ISO 8601:2000.

Re: Converting to DT

2003-06-10 Thread Joshua Hoblitt
I played with P::RecDescent for Mason, and it is slow and a memory hog. That's no dis to Damian, cause it's a great tool, but in most cases a custom regex-based parser is way faster. I talked to Damian about it at Perl Whirl and he said he's got plans for a major rewrite. Although we all

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
So this is how it would work - you write custom locales, shove them in one of the @INC paths (preferably different to the DT::Locale install path) and add the LocalInstall module which is used to register your locales. It would be nice if modules could reside in arbitrary namespaces. For

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
Can we just have an API that any module could potentially use? Now thats just entirely too rational. Thank you for articulating my frustration. $locale = new My::Locale; $dt = DateTime-new(%date, locale = $locale); I always assumed that we'd be getting this as it currently works for

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-10 Thread Joshua Hoblitt
Can we just have an API that any module could potentially use? I think we need this, but we may also need a way to hook locales into DateTime::Locale. And I think the next question is: Should this be at run-time or should there be a persistent registry? -J --

milli/micro seconds

2003-06-10 Thread Joshua Hoblitt
I've started on milliseconds and microseconds support (DT::Duration to start with). I hope nobody else has already done this. -J --

Re: milli/micro seconds

2003-06-11 Thread Joshua Hoblitt
On Wed, 11 Jun 2003, Dave Rolsky wrote: On Tue, 10 Jun 2003, Joshua Hoblitt wrote: I've started on milliseconds and microseconds support (DT::Duration to start with). I hope nobody else has already done this. Um, don't we already have this with nanoseconds? What are you thinking

Re: It could be worse ;)

2003-06-11 Thread Joshua Hoblitt
http://www.onjava.com/pub/a/onjava/2003/06/05/java_calendar.html See, it could be worse ;) OMG - they paid people to come up with that? To quote SNL: Who are the ad wizards that came up with that one? -J --

Re: RFC: Adding custom locales to DateTime::Locale

2003-06-11 Thread Joshua Hoblitt
What exactly is prevent you from just passing an object as the language parameter to the DateTime constructor? DT::Language can't be subclassed from outside the DT::Language tree because of the way the constructor works. My patch makes it so that when -new is called without any arguments an

Re: milli/micro seconds

2003-06-11 Thread Joshua Hoblitt
On Wed, 11 Jun 2003, Tim Bunce wrote: On Wed, Jun 11, 2003 at 09:29:31AM -1000, Joshua Hoblitt wrote: While I know that a millisecond needs to be multiplied by 10**6 to convert it nanoseconds I don't think that qualifies as common knowledge. Sounds like a documentation patch is needed

Re: milli/micro seconds

2003-06-11 Thread Joshua Hoblitt
Ok - this thread has certainly caused a lot of controversy. To comment on Rick's comments - I think that Dave made the correct decision to have fixed precision subsecond resolution. I in no way so attempting to insinuate this wasn't the right thing to done. I will _NOT_ submit a patch to add

Re: milli/micro seconds

2003-06-11 Thread Joshua Hoblitt
DateTime::Wrapper::SubSecond will accept parameters for resolutions from 10 to 10^9 subseconds. With corresponding methods returning these units. This seems like overkill for something which will basically do: my $nano = $p{micro} * 1000; Which is why I wanted to put it in the core.

Re: milli/micro seconds

2003-06-11 Thread Joshua Hoblitt
Ugh, the fractional_second parameter must go. The docs for it are all wrong, and what it's actually doing is _really_ odd. Sounds reasonable. Anyway, I _really_ don't like having mututally exclusive, but overlapping, constructor parameters. This makes for hard-to-read docs. Ideally, each

Re: 3 letter timezones (was month name to number)

2003-06-11 Thread Joshua Hoblitt
Any progress on this? I seem to recall that Rick volunteered to do it but I don't see that in the thread. I just started work on it anyways. If Rick already has something we can just use that instead. -J --

Re: 3 letter timezones (was month name to number)

2003-06-11 Thread Joshua Hoblitt
Any progress on this? I seem to recall that Rick volunteered to do it but I don't see that in the thread. I just started work on it anyways. If Rick already has something we can just use that instead. Strptime contains a list of three-letter timezones, however if you have a look

[announce] DateTime::TimeZone::Alias 0.01

2003-06-12 Thread Joshua Hoblitt
Released to CPAN. Available immediately from: http://kolea.ifa.hawaii.edu/~jhoblitt/pm/DateTime-TimeZone-Alias-0.01.tar.gz Changes since 0.01pre1 Renamed del to remove on Dave's advice. Cheers, -J --

[announce] DateTime::TimeZone::Alias 0.02

2003-06-12 Thread Joshua Hoblitt
Released to CPAN. Available immediately from: http://kolea.ifa.hawaii.edu/~jhoblitt/pm/DateTime-TimeZone-Alias-0.02.tar.gz Changes since 0.01 Thanks to Ben Bennett for pointing out that I might want to actually run the tests before releasing a module. (I forgot to rename del to remove in the

Re: DateTime modules for Debian Linux

2003-06-13 Thread Joshua Hoblitt
On this significant date of Friday 13th :-) I'd like to announce that I've made Debian packages for some of the DateTime modules (and some which were needed as dependencies) which you might find handy if you use this platform. This is very cool. I've been thinking about doing this for

Re: Compilation on HPUX, AIX, VMS, etc

2003-06-13 Thread Joshua Hoblitt
Can people try to compile DateTime.pm on various platforms that aren't Linux, BSD, or Win32, and let the list know if it works. I will be trying Mac OSX and Solaris via the SF compile farm, but I don't have access to other propietary Unix variants, or VMS, QNX, or other weird things like

Re: Win32 failures in t/20infinite.t

2003-06-13 Thread Joshua Hoblitt
That's cool. I'll be going to YAPC tomorrow anyway, so I'll have plenty to keep my busy. I don't suppose you'll apply my DT::Language patch before then? :) -J --

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

2003-06-13 Thread Joshua Hoblitt
This is a message that Ben sent to be privately. With his permission I'm forwarding it to the list along with my reply. Thanks for your comments Ben. -J -- -- Forwarded message -- Date: Thu, 12 Jun 2003 22:12:46 -0400 From: Ben Bennett [EMAIL PROTECTED] To: Joshua Hoblitt

Re: [announce] DateTime::TimeZone::Alias 0.01

2003-06-13 Thread Joshua Hoblitt
Is it a problem that it affects the TZ behavior across all modules? I I should document this better. am not sure how you would get around that with the current TZ interface (you would need some way to get a TZ factory object that you would use as a parameter to DT... but then anything

namespaces, command and control

2003-06-11 Thread Joshua Hoblitt
While writing some documentation for the DateTime project ( http://datetime.perl.org ) I seem to have brought up the question of namespace control. This is the paragraph in question: -- =head2 Namespace Allocation CDateTime::* namespace is allocated by the C[EMAIL PROTECTED] mailing list. Do

Re: namespaces, command and control

2003-06-11 Thread Joshua Hoblitt
On Wed, 11 Jun 2003, Dave Rolsky wrote: On Wed, 11 Jun 2003, Joshua Hoblitt wrote: namespace? I believe there is some president for this, for example DBI, He means precedent ;) I blame Aspell. :) -J --

Re: date normalization

2003-06-15 Thread Joshua Hoblitt
That version isn't on CPAN yet. To be honest, I'd really like the validation to be optional. While some people have more use for validation rather than normalization, others (like me) are the opposite =) Even just another arg: normalize = 1 or something? I'm not really sure what the

Re: date normalization

2003-06-16 Thread Joshua Hoblitt
my $safe_span = ...;# Whatever you need my dt = DateTime-new(...); croak Bad date range if $safe_span-contains($dt); In my [poor] example. But what if you only wanted to only accept time values from 11:00-18:00 across a span? In fact you may want the span to be a spanset to

Re: milli/micro seconds

2003-06-16 Thread Joshua Hoblitt
Hi Rick, Cool idea .. and I'll add DateTime::Wrapper::AllowThingsToOverflow (or something shorter) that allows you to construct with overflowing parameters (like 75 seconds, 124 minutes, 34 hours, 98 days and 16 months) Are you still going to do this? I already want to subclass it for

Re: namespaces, command and control (fwd)

2003-06-16 Thread Joshua Hoblitt
Dave, I am of the opinion that when go ahead and add this doc to CVS. If we hear from modules that they have an objection then we can change it then. Or should we start a betting pool on when we'll get a response? :) Cheers, -J --

Re: date normalization

2003-06-16 Thread Joshua Hoblitt
On Mon, 16 Jun 2003, Ben Bennett wrote: Most of the code below is building the ranges... I think youy would have to do that anyway. The real bit that the module would do is the intersection stuff, and that is a couple of lines. There must be a way to express the same semantic meaning with

Re: [announce] DateTime::TimeZone::Alias 0.01

2003-06-17 Thread Joshua Hoblitt
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

Re: [announce] DateTime::TimeZone::Alias 0.01

2003-06-17 Thread Joshua Hoblitt
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

Re: date normalization

2003-06-17 Thread Joshua Hoblitt
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. :)

Re: milli/micro seconds

2003-06-17 Thread Joshua Hoblitt
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

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

2003-06-17 Thread Joshua Hoblitt
-- 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

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

2003-06-17 Thread Joshua Hoblitt
-- 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

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

2003-06-17 Thread Joshua Hoblitt
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 )

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

2003-06-17 Thread Joshua Hoblitt
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

Re: What should a business module implement?

2003-06-17 Thread Joshua Hoblitt
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 --

Re: What should a business module implement?

2003-06-17 Thread Joshua Hoblitt
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 -

Re: What should a business module implement?

2003-06-17 Thread Joshua Hoblitt
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

utc_rc_values nanosecond support

2003-06-18 Thread Joshua Hoblitt
Hi Dave, Two questions: 1) When is fractional second support going to be dropped? and 2) It just occurred to me that nanosecond precision is lost when converting between calendars. It seems that it should be fairly trivial to add this support. sub _calc_utc_rd needs support for

Re: ISO 8601 is eeeevil!

2003-06-18 Thread Joshua Hoblitt
The root of the collisions is the arbitrary number of extended digits (which may be 0, so you could have -0101, now is that the year 102 BC, or January in 2001? The extended formats also collide internally, i.e. what is the date +1985? Is it a century or a year? That document is a disaster

Re: Having problems with Datetime-format-Strptime-1.02 install on Wi n32

2003-06-19 Thread Joshua Hoblitt
I am running the CVS versions of DateTime/DateTime-TimeZone for perl 5.6.1 Hi Ron, I don't claim to know anything about perl on win32 but I'm wondering if there is any difference in warnings under 5.8.0. Is it possible for you try this? -J --

Re: Jalali Calendar

2003-06-19 Thread Joshua Hoblitt
It looks like the Jalali calendar is also called the Persian calendar, so DateTime::Calendar::Persian is a possibility too. I'm not familiar with this calendar, its most common name, and the way it is used, so you (Ahmad) should judge for yourself what name would be best. In Calendrical

Re: ISO 8601 is eeeevil!

2003-06-19 Thread Joshua Hoblitt
I don't know if I will manage to finish this thing, it is a bit of a monster. Thats what happened to me. :) -J --

Re: Slides from YAPC presentation

2003-06-19 Thread Joshua Hoblitt
I put these on datetime.perl.org. They're linked from the resources page. This is a great primer to some of the issues in time handling. It'd make an interesting talk even with out all the bits about programming. Btw - Is anyone headed to OSCON? -J --

Re: ISO 8601 is eeeevil!

2003-06-20 Thread Joshua Hoblitt
I was thinking about DateTime::Format::ISO8601... unless you have laid claim to it. This is the namespace I started on in March but whatever does ISO8601 should go there. Perhaps one of you should add it to the CVS server as-is and both work on it? I haven't worked on this since the

Re: ISO 8601 is eeeevil!

2003-06-20 Thread Joshua Hoblitt
I haven't worked on this since the beginning of April. I believe this is most of the date specifications - not including the week formats. Week and UTC offset handling, time formats, and date + time formats are left (actually shouldn't be that bad). Although I don't remember why I

[rfc] DateTime::Util

2003-06-20 Thread Joshua Hoblitt
As I'm thinking about normalizing week + day numbers to month + day numbers I'm wondering if there shouldn't be a module for all such common (to DT modules) conversion functions? Comments? -J --

Re: What's up with DT::TZ::Alias?

2003-06-20 Thread Joshua Hoblitt
There's been a lot of discussion about it which I unfortunately couldn't follow. Now it's up to 0.04 and seems to have a lot of functionality, and I really don't see the point of all of it. And even worse, it's gotten _more_ intimate the with DT::TZ internals, instead of less. There was a

Re: Slides from YAPC presentation

2003-06-20 Thread Joshua Hoblitt
Btw - Is anyone headed to OSCON? I'll be there. There's also a Perl datetime BOF scheduled for Thursday night from 8-9. Theres a pdx.pm meeting on Wednesday from 7-10 if your interested. I'm actually from Portland and arriving on the 27th of June if anyone wants to get together

Re: ANNOUNCE: DateTime::Locale - new release for feedback

2003-06-20 Thread Joshua Hoblitt
What will happen is end users find errors in the locale stuff, report it to DateTime or me, it gets forwarded to OpenI18N, who may or may not apply it when they feel so inclined - we'll have to wait like mugs, and users will get p*ssed off by the slow turnaround. I agree with you here but

Re: Slides from YAPC presentation

2003-06-20 Thread Joshua Hoblitt
which opens Friday night? Is there a decent movie theatre downtown? Theres several - but wouldn't you rather be in a theater you can drink in? (and has brewery and a distillery on site) This is as far forward as their schedules are posted:

Re: [rfc] DateTime::Util

2003-06-20 Thread Joshua Hoblitt
On Fri, 20 Jun 2003, Ben Bennett wrote: Is this for taking an ISO week number and day of week and getting a month, day and year back? Dave, would it be possible to have a DT constructor for this? There is an accessor (week()) that does the reverse... For the ISO8601 module it would be

Re: [rfc] DateTime::Util

2003-06-20 Thread Joshua Hoblitt
I can't think of any other usage which necessitates such a constructor. strptime needs it. -J --

  1   2   3   4   >