Opened 6 years ago

Closed 7 months ago

#1484843 closed Feature Requests (wontfix)

date format for messages in last year

Reported by: mikelward Owned by:
Priority: 5 Milestone: later
Component: Client Scripts Version: 0.1-stable
Severity: minor Keywords:

Description (last modified by alec)

I really like being able to set different formats for messages from today and the last week. It would also be really cool if I could set a custom format for message from the last year.

For what it's worth, these are the settings I use:

date_today = ' ';
date_short = 'l';
date_medium = 'j M';
date_long = 'M Y';

which gives

24 Feb
Mar 2007

The obvious patch is:

  $year_limit = mktime(0, 0, 0, $now_date['mon']-11, 0, $now_date['year']);

below $week_limit in include/ (about line 1513)


  else if ($CONFIG['prettydate'] && !$format && $timestamp > $year_limit && $timestamp < $now)
    $format = $CONFIG['date_medium'] ? $CONFIG['date_medium'] : 'd.m H:i';

below $format = $CONFIG['date_short']... (about line 1520)

Obviously this includes the time, as the other default formats do, but it omits the year, implying it occurred within the last 11 months. Anything from the same month last year would use the full date format.

Attachments (2)

year-date.patch (1.1 KB) - added by mikelward 6 years ago.
proper patch - a simple change to would also be a good idea
date_medium.diff (1.1 KB) - added by mikelward 5 years ago.
patch re-spun against 0.3RC1

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by mikelward

proper patch - a simple change to would also be a good idea

comment:1 Changed 6 years ago by thomasb

  • Description modified (diff)
  • Milestone changed from 0.1.1 to later
  • Severity changed from normal to minor

(better wiki formatting)

comment:2 Changed 6 years ago by alec

-1 from me

comment:3 Changed 5 years ago by mikelward

Why don't you like it Alec?

Any other thoughts? IMHO the change is trivial and useful.

Changed 5 years ago by mikelward

patch re-spun against 0.3RC1

comment:4 Changed 7 months ago by alec

  • Description modified (diff)
  • Resolution set to wontfix
  • Status changed from new to closed

No one interested? Closing.

Note: See TracTickets for help on using tickets.