SMOKEY_TEK Posted December 25, 2010 Share Posted December 25, 2010 Does anyone know how to make Age: into days instead of like saying week... For example: 14 days old it wouldn't say 2 weeks, it would say 14 Days ? The bit of code is in classes.php, but I'm not sure how to modify it to change it.. Please help me (: Thank You. Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted December 25, 2010 Share Posted December 25, 2010 Just remove the function ie it's probably something like function($user_class['days']); Quote Link to comment Share on other sites More sharing options...
SMOKEY_TEK Posted December 27, 2010 Author Share Posted December 27, 2010 I'm assuming this is where to edit to make it days instead of week(s), month(s), year(s) function howlongtil($ts) { $ts=$ts - time(); if ($ts<1) // <1 second return " NOW!"; elseif ($ts==1) // <1 second return $ts." second"; elseif ($ts<60) // <1 minute return $ts." seconds"; elseif ($ts<120) // 1 minute return "1 minute"; elseif ($ts<60*60) // <1 hour return floor($ts/60)." minutes"; elseif ($ts<60*60*2) // <2 hour return "1 hour"; elseif ($ts<60*60*24) // <24 hours = 1 day return floor($ts/(60*60))." hours"; elseif ($ts<60*60*24*2) // <2 days return "1 day"; elseif ($ts<(60*60*24*7)) // <7 days = 1 week return floor($ts/(60*60*24))." days"; elseif ($ts<60*60*24*30.5) // <30.5 days ~ 1 month return floor($ts/(60*60*24*7))." weeks"; elseif ($ts<60*60*24*365) // <365 days = 1 year return floor($ts/(60*60*24*30.5))." months"; else // more than 1 year return floor($ts/(60*60*24*365))." years"; }; Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted December 27, 2010 Share Posted December 27, 2010 Just on the output remove the function Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.