It could be the
printf statements are "not working" or, because of some conditional statement that you have not shown, maybe they are not being executed at all?
Your original question was about the 'day' subroutine, maybe one of the other modules you included also exports a subroutine of the same name which does something else? You could try a simple test script just using all those modules set with
use warnings; use strict; as see if you get any error messages about subroutines being redefined.