Flexible FriendlyTime v1.4

Release Notes

Cleaned up the translation code

Changed format of changelog to work in plugins page

  • This plugin seem very interesting to our platform where our server is in iceland, big parts of users could be in the US, others in Europe, others in australia, who knows...my question is does setting this up would also change or convert the time of a particular event (using event calendar) to the correct used based timezone ?

    if we define EN on one timezone, what would UK people get for time reference ?
    the end of the question is : how to make event calendar display correctly the time of the event based on each user based location ?

  • It only affects times output by the elgg friendly timei view - I don't know if event calendar is using that or not.

    Currently the plugin only outputs time globally - ie. if you set an offset it's the same offset for everyone regardless of location.  It's possible to update it to use viewer timezone settings.

  • it's really a problem to our platform, because people are from so many different location, that its always a headeach to program a meeting and calculate manually all the timezone, we usually deal with a least 4 timezones right now, but the biggest problem is that the event is only "right" on time for the user that created it, for all other users it does not mean anything for their timezone. (they need to convert it)
    it would be so great to have some kind of plugin that would offset the time of a particular event based on where the user is or what country (ie timezone) has been filled on profile or another solution..i'm not sure if its the best approach, maybe a time converter right on the event would solve this. not sure how we can solve this in our case.

  • For events specifically the best thing to do would be to contact Kevin Jardine and see how much he'd charge to add in user timezone handling.

  • i will do that, thanks for your suggestions !

  • straight hard code =>
    date('j M Y',..)
    no settings, nothing;
    for events ->  it has to be the event's date that (really) matters,
    we could do something like (free) timeanddate.com does
    in their 'meeting planner'  and maybe (at least) display zones
    (e.g. from my little js 'world clock';) to let users pick/choose
    and coordinate their timezones w.r.t meetings or events ->

    RIC Jan 9 2013
    20 01 28
    STG
    Jan 9 2013
    21 01 28
    SYD
    Jan 10 2013
    12:01 28    DST  
    GMT
    Jan 10 2013
    1 01 28
    SFO
    Jan 9 2013
    17 01 28
    CHI
    Jan 9 2013
    19 01 28
    AMS
    Jan 10 2013
    2 01 28
    PAR
    Jan 10 2013
    2 01 28
    DEL
    Jan 10 2013
    6 31 28
    HKG
    Jan 10 2013
    9 01 28
  • Thanks for this very useful mod.

    With ref. to this discussion,

    I see I can change/translate the name of months but how do I do so for the digits - 0 to 9 ?

    For example, 16  -> १६

    or 1 -> १

    Any translations for 'just now', minutes, hours, 'ago' etc?

    Can someone explain in some more details?

  • You'll have to override the view and translate them there.  I don't think people usually think about translating numbers, I sure don't.

  • If it's a simple 1:1 character replacement (eg. 1 = a, 2 = b, so 12 = ab) you can hook into the views and replace each character after they render.  This would be the preferred way so you can target multiple views and not have to be concerned with overrides.  I don't know any other languages though so I'm no use to anybody when it comes to the finer details of parsing for programmatic translation.  Simple string and character substitution is as much as I can tell you.

  • Thanks Matt. Thanks again. Yes, simple str replace works fine. I am not sure if it can break anything else or cause any other problem but it does work okay for me.

Matt Beckett

I'm a self-employed web developer, family man, nerd, scuba diver. Manager/maintainer of this elgg community site, and core Elgg development team member.

Stats

  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2015-10-13
  • Downloads: 1719
  • Recommendations: 12

Other Projects

View Matt Beckett's plugins