Skip to:
Content

BuddyPress.org

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#248 closed defect (bug) (fixed)

Allow dynamic date formating according to blog date format

Reported by: jehy's profile Jehy Owned by:
Milestone: Priority: major
Severity: Version:
Component: Keywords: translation, date, time, hardcoding
Cc:

Description

bp-core/bp-core-templatetags.php, line 309

function bp_format_time( $time, $just_date = false ) {
	$date = date( "F j, Y ", $time );
	
	if ( !$just_date ) {
		$date .= __('at', 'buddypress') . date( ' g:iA', $time );
	}
	
	return apply_filters( 'bp_format_time', $date );
}

Please, replace it with

function bp_format_time( $time, $just_date = false ) {
	$date = date( get_option('date_format'), $time );
	
	if ( !$just_date ) {
		$date .= ' '.__('at', 'buddypress') . date(' '. get_option('time_format'), $time );
	}
	
	return apply_filters( 'bp_format_time', $date );
}

With this you will allow using of blog's date format instead of hardcoding ;)

Change History (3)

#1 @apeatling
16 years ago

  • Milestone set to Core 1.0

#2 @apeatling
16 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#3 @(none)
15 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.