Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#26502 closed enhancement (fixed)

Dashboard Activity dates conditionally need the year

Reported by: GaryJ Owned by: chriscct7
Priority: normal Milestone: 4.4
Component: Administration Version: 3.8
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

If you import the Theme Unit Test data, one of the posts is scheduled for Jan 1st 2050. The Dashboard Activity widget doesn't indicate what year this is scheduled for though, and leaves the date as ambiguous - I suspect most people would assume it would be in a few weeks time, given no other information. The same would apply if the Recent Activity doesn't have a limit on it, where the last post was more than a year ago.

Since these might be moving towards edge cases compared to activity on a lot of sites, I'd like to see a year included only if the timestamp is more than 1 year before or after the current date (rather than on each date).

Screenshots included for clarification.

Attachments (5)

dashboard-activity-missing-year.png​ (5.3 KB ) - added by GaryJ 13 years ago.
Trunk - years not shown on dashboard activity widget.
dashboard-activity-included-year.png​ (5.4 KB ) - added by GaryJ 13 years ago.
Suggestion - include years where timestamp is more than 1 year before or after the current time.
26502.diff​ (774 bytes ) - added by GaryJ 13 years ago.
Show date if timestamp difference is greater than 1 year
26502-alt.diff​ (798 bytes ) - added by GaryJ 13 years ago.
Show year if timestamp has different year to now.
26502.patch​ (810 bytes ) - added by chriscct7 11 years ago.
Refreshed the alt patch (johnbillion's suggestion)

Download all attachments as: .zip

Change History (12)

@GaryJ
13 years ago

Trunk - years not shown on dashboard activity widget.

@GaryJ
13 years ago

Suggestion - include years where timestamp is more than 1 year before or after the current time.

#1 @SergeyBiryukov
13 years ago

  • Component General → Administration

#2 @johnbillion
13 years ago

Probably the most logical thing to do is to display the year if the post date's year is not the same as the current year.

@GaryJ
13 years ago

Show date if timestamp difference is greater than 1 year

@GaryJ
13 years ago

Show year if timestamp has different year to now.

#3 @GaryJ
13 years ago

Two suggestions offered:

  • 26502.diff​ goes with a difference in the timestamp of more than one year, as per original ticket description.
  • 26502-alt.diff​ goes with johnbillion's (probably more sensible) suggestion of showing the year if it's not the same as the current one.

#4 @SergeyBiryukov
13 years ago

  • Keywords has-patch 3.9-early added
  • Milestone Awaiting Review → Future Release

#5 @chriscct7
11 years ago

  • Keywords 3.9-early removed
  • Owner set to chriscct7
  • Status new → assigned

@chriscct7
11 years ago

Refreshed the alt patch (johnbillion's suggestion)

#6 @chriscct7
11 years ago

  • Keywords commit added
  • Milestone Future Release → 4.4
  • Status assigned → accepted

Refreshed the patch. Good to go.

#7 @SergeyBiryukov
11 years ago

  • Resolution → fixed
  • Status accepted → closed

In 34980:

Dashboard: Display year in Activity widget if the post date year is not the same as the current one.

Props GaryJ, chriscct7.
Fixes #26502.

Note: See TracTickets for help on using tickets.