#50 Patch to have date in language of choice

closed-accepted
Chris Nandor
5
2001-06-26
2001-06-07
No

This patch allows to have dates returned in a language
other than English. It does so by calling
Date::Manip::DateInit inside Slash::Utility::timeCalc.
The language is set using a new entry in the vars
table, called datelang. The value most be in a format
recognized by Date::Manip e.g. Italian, English,
German, etc. Only the languages supported by
Date::Manip can ofcourse be used.

It may run into trouble if the database engine doesn't
return date in English format, something that is not
very common and I believe not supported at all on
MySql. In this case, you would just have to set a
different default language. You could, ofcourse, put
extra code to handle this situation.

Discussion

  • Patch for Slash/Utility/Utility.pm

     
    Attachments
  • Logged In: YES
    user_id=578

    This improved patch reduces the overhead to almost nothing
    when the datelang is not set or set to 'English'.

     
  • Improved Patch for Slash/Utility/Utility.pm

     
    Attachments
  • Chris Nandor
    Chris Nandor
    2001-06-25

    • assigned_to: nobody --> pudge
     
  • Chris Nandor
    Chris Nandor
    2001-06-26

    Logged In: YES
    user_id=3660

    Thanks for the patch, applied to fry.

     
  • Chris Nandor
    Chris Nandor
    2001-06-26

    • labels: 310623 --> Development branch
    • status: open --> closed-accepted