What I'd like to know is:
1) Is it any good?
2) Does something like that already exist on the CPAN? (because if it does, I'm having trouble finding it)
3) If it is any good and nothing like it exists (yeah, sure, get real), any general comments on it?
TIA
Re: Date:: ... MakeHash? :-| (Score:2)
* I think you have trimester and quartermaster the wrong way round.
* Does 'quartermaster' have the meaning you're trying to give it here? Maybe it should be 'quartermester'.
* Your calculation of whether a year is a leap year is incorrect (1900 and 2100 are not leap years).
* Would it make sense to also have a "make_gm_hash" function?
* Looks like most (all?) of your reference data hashes would be better implemented as arrays.
* With a module that only exists i
Re: Date:: ... MakeHash? :-| (Score:1)
* I think you have trimester and quartermaster the wrong way round.
Probably... I said I couldn't sleep, I didn't say I wasn't sleepy O:-)
* Does 'quartermaster' have the meaning you're trying to give it here? Maybe it should be 'quartermester'.
Probably so (I had a note here to check the meaning of the word in a dictionary)
* Your calculation of whether a year is a leap year is incorrect (1900 and 2100 are not leap years).
I am aware of that, but thanks for noting :-)
* Would it make sense to als
Re: Date:: ... MakeHash? :-| (Score:2)
It would do exactly the same thing as "make_hash", except it would use "gmtime" instead of "localtime".
A couple more suggestions:
* Call the function "make_date_hash" instead of "make_hash".
* If no argument is given, call "localtime" without an argument - to get a hash representing the current date and time.
Time::localtime (Score:1)
Maybe you should return an object instead of hash, that way if you decide to add something that requires non trivial calculation only those people interested in it pay the cost.
Re:Time::localtime (Score:1)
The Date namespace is pretty clobbered up, in my opinion, and that's why I'm discussing this on my journal before uploading something like this.
The idea of the object seems good
Time::Piece (Score:2)
Re:Time::Piece (Score:1)