use strict; use Date::Format 'time2str'; print time2str("%Y-W%W", time);