So basically instead of passing Language to MWTimestamp you want to pass
MWTimestamp to Language. IMHO it's fine with me, so long as the logic is
properly separated. In the end, all this would require is the addition of
MWTimestamp::diff (or since) and MWTimstamp::userAdjust, which Language
would call in order to get the proper timestamps.

I can work on a patch for this now.
*--*
*Tyler Romeo*
Stevens Institute of Technology, Class of 2015
Major in Computer Science
www.whizkidztech.com | [email protected]



On Fri, Oct 26, 2012 at 6:18 PM, Chad <[email protected]> wrote:

> On Fri, Oct 26, 2012 at 6:07 PM, Tyler Romeo <[email protected]> wrote:
> > The proper implementation would be to separate the timestamp logic
> > (calculating how long ago, adjusting based on user timezone preferences,
> > etc.) and the language logic (getting messages for the day of the week,
> > formatting the date and time, actually making the message).
> >
> > Then, have MWTimestamp process the timestamp and then pass the data onto
> > Language to do the formatting. That way it happens transparently.
>
> If you're passing the output of MWTimestamp to Language, it's not
> transparent. If you want to do it transparently, you have to keep the
> accessor in MWTimestamp and pass a Language object (which I've
> already argued against).
>
> I see no harm in using MWTimestamp in Language, but please let's
> not do it the other way around.
>
> -Chad
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to