Date::Time - Lightweight normalised datetime data type
This is just some suggestions, as nothing is implemented yet. I'm open to critisism. Anyway I don't know if the original name will fit this module with all my plans....
# Set date
$date->set; # Set to current time
$date->set(time-60); # Set to 'one minute ago'
$greg->parse(source=>'Fri Mar 3 01:20:54 CET 2000');
$greg->parse(source=>'one month ago', format=>'unknown');
my $db_time=new Date::Time::MySQLTimeStamp;
# Output date and date elements
# The month operator here will return a Date::Gregorian::Month object.
# Will print something like "3 hours ago" or "5 weeks ago"
See the README as for now. By the way, I want to be neutral to the calender system - that's why the SYNOPSIS above looks like it does. Personally I think Gregorian dates sucks a lot - but I'm living in a Gregorian world and I'm myself mostly thinking about time in Gregorian terms anyway.
The same applies to the decimal number system, btw. I mean, of all numbers, why on earth did they chose 2*5? It's really a stupid, ugly number :) Anyway, I'm always thinking in decimal terms, it's very hard for me to do calculations in other systems.
I'm intending to write a bit about how I've thought implementing this one here. Some thoughts are already in the README.
I will write a bit on how to do subclassing and how to contribute new methods here.
Tobias Brox <email@example.com>
All kinds of feedback is welcome - and is probably a prerequisite for progress on this module.
To install Date::Time::UnixTime, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.