Hmmm. 3000000 is less than 7 hours shy of 35 days. I wouldn't call that "4 weeks", not even in "nice units". I'd call that "about a month" or "about 5 weeks". Similar, 400000 seconds is closer to 5 than to 4 days; 12000000 is closer to 5 months than to 4, and 150000000 seconds in closer to 5 years than to 4.
You may want to do $period = int($period + 0.5) when rounding.