Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 10 years ago

#3056 closed enhancement (wontfix)

Rewrite bp_core_time_since() to use WP's human_time_diff()

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords:
Cc:

Description

No need to reinvent the wheel!
http://codex.wordpress.org/Function_Reference/human_time_diff

Thought I'd list it down as an enhancement. Also no time for a patch at the moment as it's 3am here! ;)

Change History (6)

#1 @DJPaul
13 years ago

  • Keywords dev-feedback added

Whilst this would be easy to do, a consequence is instead of getting text like "1 month, 1 week ago", it'd be "39 days ago." I prefer the former (O/T but maybe it could go upstream as a WordPress enhancement).

#2 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#3 @r-a-y
13 years ago

You're right about human_time_diff() not including months and years!

WP cross-reference ticket: #WP9272.

Last edited 13 years ago by r-a-y (previous) (diff)

#4 @SergeyBiryukov
11 years ago

  • Severity set to normal

Related: #5015

#5 @SergeyBiryukov
11 years ago

Looks like even if #WP9272 adds weeks, months, and years to human_time_diff(), the output would still be different.

bp_core_time_since() returns two chunks: "1 month, 1 week ago". human_time_diff() only returns one chunk.

#6 @r-a-y
10 years ago

  • Keywords dev-feedback removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

After re-reading this thread, I agree with Paul. Returning one chunk isn't so great; BP's solution is better :)

Note: See TracTickets for help on using tickets.