New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Friendlier Time (Trac #1531) #1531
Comments
Attachment added by trac user jricher on 40136142-06-30: friendlier_time.patch |
trac user jricher wrote on 40136475-04-28 I did it this way as a compromise between the two alternatives posited in #1265 that uses both where reasonable (at least, as I thought). Ultimately, I'd rather have there be a programmatic way to set the time and date formatting for different time periods, and to set the time periods themselves, from an admin console. One of our sites here had actually overridden the friendly_time function call to always post the date string (in a hardcoded format), and it'd be nice to have that as a configuration option. But until we figure out how to do that, I think this is a good stopgap that'd keep us from having another local patch against 1.7 final. As to #451, I'd be happy to see this use strftime instead of date -- but where do we get the info to send into setlocale in the first place? Without that, strftime is as limited as date, it seems. |
cash wrote on 40136499-07-02 Decided not to close #1265 for the time being. Eventually Elgg is going to have to deal with locale and timezones (especially if we allow absolute timestamps). I'm assuming we'd do it by allowing the admin to select the defaults and users can set their own location just like they can set their own language. What we did was use the acronym tag on timestamps so it shows the friendly time and if you mouse over, it shows absolute. |
brettp wrote on 40139787-09-07 (In [svn:3957]) Refs #1531: Added full time and dates to friendly time stamptes via acronym tags. |
trac user thomas wrote on 40146224-02-10 Sibce [svn:3957] the logic is broken, because the old "return" skiped the rest of the function. Now
will be always the winner, because it stands outside an else {} and will always overide
Here the complete fix
|
trac user thomas wrote on 40146233-06-16 And another one:
There was missing a ) after elgg_echo('friendlytime:date_format', so always the actual time was returned |
brettp wrote on 40146902-04-01 (In [svn:3965]) Fixes #1531: Correctly implemented dates for friendly times. No more coding while watching the Olympics! |
Original ticket http://trac.elgg.org/ticket/1531 on 40136141-10-07 by trac user jricher, assigned to unknown.
Elgg version: 1.7
Formats friendly times older than 2 weeks as a simple date, using the language file and elgg_echo to determine the date format (allows for custom localization of dates, too).
The text was updated successfully, but these errors were encountered: