Posted 20 декабря, 20203 yr comment_166280 Hi, how can i make that code to check in months and years (both) or month or year separately? Thanks. <div class="custom"> {{$date_joined = floor((strtotime("now")-strtotime("{$comment->author()->joined}"))/86400) ;}} <span class="leftinfo"><i class="fa fa-calendar"></i> $time of fappig:</span> <span class="rightinfo">{$date_joined} Days</span> </div> Link to comment https://ipbmafia.ru/topic/22712-how-to-remake-checking-in-months/ Share on other sites Больше вариантов
20 декабря, 20203 yr comment_166285 Something like $ct = DateTime::createFromFormat('U', time()); $jt = DateTime::createFromFormat('U', $comment->author()->joined); $delta = $jt->diff($ct); $years = $delta->format('%y'); $month = $delta->format('%m'); echo "Fapping with us {$years} year and {$month} months"; Link to comment https://ipbmafia.ru/topic/22712-how-to-remake-checking-in-months/?&do=findComment&comment=166285 Share on other sites Больше вариантов
21 декабря, 20203 yr Author comment_166297 Good, but i got an error. [[Template forums/front/topics/postContainer is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] Link to comment https://ipbmafia.ru/topic/22712-how-to-remake-checking-in-months/?&do=findComment&comment=166297 Share on other sites Больше вариантов
21 декабря, 20203 yr comment_166298 {{$ct=\DateTime::createFromFormat('U',\time());$jt=\DateTime::createFromFormat('U',$comment->author()->joined);$delta=$jt->diff($ct);$years=$delta->format('%y');$month=$delta->format('%m');}} <div class="custom"> <span class="leftinfo"><i class="fa fa-calendar"></i>Fapping with us</span> <span class="rightinfo">{$years} year and {$month} months</span> </div> Link to comment https://ipbmafia.ru/topic/22712-how-to-remake-checking-in-months/?&do=findComment&comment=166298 Share on other sites Больше вариантов
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.