Wednesday 2nd of May 2007, 3:07
9000 days
Ha! Today I am nine thousand days old! In way of celebration I give you nine thousand pixels, each a unique variation on one of my preferred colours.

Such a grand old age is reason enough for a pint or two in The Old Green Tree tonight.
So how old are you? To find out, in days of course, click here. (Only works for those born after 1.1.1970 due to the UNIX epoch, I will try to find a solution to this limitation after the exams.)
(I did make a little C++ script to generate an image but it was rubbish. Credit goes to Gerald for his clever PERL script that gave nine thousand orange colours in increasing hue, cheers Gerald.)

Happy 9000th day birthday!
To be honest, I can’t really see all that much difference in the orange…
I tried out my own to see how old I am using your programme and here’s what it said: Your birthday is Tuesday 29th October 1985 and you are 7,855 days old today!
Very cool programme!
Kash
Cool, in the lead by 97 days! I don’t like the way the program has anticipated me not reaching 57.5 years old…does it know something I don’t??
9221 days for me - I must be the oldest so far, but don’t think I should be proud of that!
Can’t see any other difference in orange colour either! Maybe my monitor isn’t that accurate!
I too was surprised at the mono colour appearance of the image but I suppose that 9,000 out 16,777,216 RGB colours (256 x 256 x 256) is a minute fraction.
Laura, I am not in fact Death. The script cannot calculate dates after 2038 as the Unix timestamp counts the seconds passed from 1.1.1970 and 32bits of some memory run out of memory for large numbers. I don’t have time now, more exams, but hope this summer to find a similiar script that allows accurate calculations from 1.1.1900 to 31.12.2100.
It won’t be long until I am 9009 which is reason enough for celebration. 9119 is far away, as is 9229 and so on.
Would it be any good if we celebrated these landmarks instead of birthdays? …it would mean that your “birthday” would be at a different time of year each time; it would be more special, and we could get away with spending less money on presents since we would have only 0.36525 times the number of birthdays.
I loaded the image in the gimp. If you zoom in an look very carefully at the left hand end of the image then you can see subtle difference in the hue of each pixel. However most of the image (say 95%+) is all a single shade (#F16103). Maybe the image got compressed at some point or stored in a 256 colour format. Care to post the source of your perl script?
A standard unix timestamp will overflow sometime in 2037. I am 10,612 days old (+0.5 I think by now).
Also try using the PHP functions cal_to_jd and cal_from_jd which use day numbers (from January 1st, 4713 B.C) and so should work for all but the oldest of your readers!
http://uk2.php.net/manual/en/ref.calendar.php
Happy 9000 days old today!
Hope that you have a lovely drink tonight…think I’m definately going to need one on Friday - its been a manically busy week!
x
Hey Rob,
I did look at using the Julian date day numbers but could not ascertain how well they take into account leap years and odd things like in the 14th century when they gained or lost ten days as the calander was going out of order. Also it was only in the 1920’s (ish) that the globe (generally) had a shared date system. This is something I would like to look into for interest but for now just stuck to timestamps.
Also the code I use to calculate one’s age in days is inefficient as it loops through each day counting the days from the birthday to the current day.
The script for the image loops through 20 for R, 25 for G and 18 for B (or what ever the numbers are to make 9000) making unique combinations. I will send you the output text file.
The image was kept as a bmp, I thought this would keep all the colours.
Hmmm, what to do. Am looking at image in photoshop and cannot really tell…
It doesn’t matter what the julian date stuff actually does, it will give you a unique day number for any day that has ever been. So you calculate the day number of the persons date of birth, and the day number of today, and subtract the two to get their age in days. Then to do the table of millenidiaveraries, you keep adding 1000 to their birth day number and convert back to the Gregorian date for output.
Happy 9000th day and many happy returns etc. etc.
I agree, there is a suspiciously monotone appearance to the image… and indeed the GIMP bears this out. I offer the source to the perl script: (no source tags available, it seems)
#! /usr/bin/perl
use warnings;
use strict;
use GD;
my $im = new GD::Image(450,20);
my @colours;
my $i = 0;
foreach () {
(my $a, my $b, my $c) = split;
$colours[$i] = $im->colorAllocate($a,$b,$c);
$i++;
}
#my $count = 0;
## allocate some colors
#foreach my $x (1..25) {
# foreach my $y (0..19) {
# foreach my $z (1..18) {
# $colours[$count] = $im->colorAllocate(236 + $y,93 + $z,0 + $x);
# print 236+$y,”\t”,93+$z,”\t”,$x,”\n”;
# $count++;
# }
# }
#}
$im->interlaced(’true’);
my $count = 0;
foreach my $x (0..449) {
foreach my $y (0..19) {
$im->setPixel($x,$y,$colours[$count]);
$count++;
}
}
print $im->png(0);
__END__
To call, open bash and type:
gerald@ged:~$ ./rob.pl output.png
For those using less advanced OSes, running is left as an exercise for the reader. ;)
The commented section in the middle is the bit that creates the input.txt file.
Gerald, GD works in 256 colour mode unless you specify trucolour mode when you create the image:
my $im = new GD::Image(450,20,1);
Gah! Well… I was close. Note to self: more RTFMing is in order.
Happy 9009 day!!