Apologies if this is a really simple question but I am interested in trying to reach an accurate answer and not just a “rounded” up answer.
My problem is: I know somebody is 27.12 on the 18th of March 2008 (random example). How can I calculate, to the nearest approximation, his date of birth. Age is always provided as a real number to two decimal points.
eumiro’s answer does the trick; the following, using the Time::Piece module (bundled with Perl since 5.10) is perhaps more maintainable.
This will get you within a few days of the actual birthday, due to the lack of accuracy (1/100 year) in the age.