Older blog entries for Rich (starting at number 3)

Released Date::ICal 1.61 last night. It is pretty cool, with things like overloading on - so that you can do

$duration = $date1 - $date2;

And there are some much more efficient internal algorithms, and a new class, Date::ICal::Duration, written by srl.

Get a new copy as soon as your CPAN mirror replicates.

In other news, I'm *almost* done with my book (http://www.apacheadmin.com/) which will be a happy happy day.

My publisher firmly believes that I spent the weekend writing a book, and I did in fact spend some of the weekend doing that. I even got some things done.

But most of the geek-time this weekend was spent working on Date:: Perl modules. I've submitted a story to use.perl about the new modules, and I don't feel like retyping it here.

The short form is that I wrote Date::Passover, Date::GoldenNumber, Date::Chinese, Date::SundayLetter, and updated several of my other Date:: modules. I think I also updated Apache::Htgroup, but that might have been on Friday.

I should have my copy of Calendrical Calculations any day now, and I really want to stake my claim to certain Date:: namespaces that look particularly fun. I almost wrote Date::Bahai this weekend (I might call it Date::Baha'i just for fun) but did the Chinese one instead because it is altogether more fascinating.

The Chinese calendar is *way* more interesting than the cycle of 12 animals that you've seen on your placemat at the Peking Moon. It is a cycle of 19 years, superimposed on a cycle of 10 years, superimposed on a cycle of 12 years. This is going to be a lot of fun.

Today I got out a new version of Date::Leapyear and a new version of Apache::Htgroup.

Randal Schwartz emailed me and asked why Date::Leapyear requires Perl 5.6. The real reason is that I lazily used h2xs to generate the module, and then never changed it. The new h2xs makes your module require 5.6, for no apparent reason. So I stripped that out and released 1.04

Someone asked me what license Apache::Htgroup was under. I've been meaning to attach a license to all of my modules, and had just not gotten around to it yet. So I stuck a LICENSE file in with the distribution and put up a new version, along with some other minor edits.

At TPC, we got a new version of Date::ICal out. Actually, about 3 of them. This was a complete rewrite of Date::ICal, in order to change the internals around and make it easier to work with.

The internals were icky, contained a lot of redundant code, and stored the date in several formats at the same time. So if you changed one, you had to make sure to go around and change all the others also.

Now there's just one authoritative internal format, and the other attributes are calculated from that.

Two changes that are still under consideration are:

1) Use Memoize to make sure that we are not recalculating the same stuff over and over. For example, when you call $obj->ical, it calls $obj->year, $obj->month, and $obj->day. Each of those, in turn, calls parsedays to get that attribute frome the julian date. That's just silly, since you end up parsing the date three times to get the ical string. Using Memoize will remove that, and speed things up by 3 in a lot of places.

2) Split the date/time floating point number into a date integer, and a time integer. We're getting round-off errors of a second, and that's just not acceptable. Splitting into two values will remove the roundoff, and be accurate for another 100,000 years or so. Should be sufficient.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!