http://www.perlmonks.org?node_id=1096641


in reply to week of the year

Date::Manip will do that (but note that it will parse your string as 2008-06-14, so you'll need to reformat it to get what you want):
use Date::Manip; $d = ParseDate("2014-08-06"); print UnixDate($d,"%W");
will give 32.