LPH
Well-known member
Code currently uses the WordPress method of date time format but the XenForo way of showing the relative date information is much nicer. How is this done in XenForo?
Current code:
Reading older threads suggests people were using 'l, F j - g:i a' but that isn't relative and would always show the name of the day of the week, etc.
XenForo_Input:ATE_TIME is simply returning a string.
Any suggestions?
Current code:
PHP:
$featured_forum_threads = $featured_threadModel->getThreadsInForum( $featured_forum, $conditions, $fetchOptions );
foreach ( $featured_forum_threads as $featured_forum_thread) {
$threadTitle = $featured_forum_thread['title'];
$threadDate = date_i18n( get_option('date_format'), $featured_forum_thread['post_date'] );
$lastThreadDate = date_i18n( get_option('date_format'), $featured_forum_thread['last_post_date'] );
}
Reading older threads suggests people were using 'l, F j - g:i a' but that isn't relative and would always show the name of the day of the week, etc.
XenForo_Input:ATE_TIME is simply returning a string.
Any suggestions?