statistics
People Online: 13
Today's Visitors: 155
Total Visitors: 3,792,265
May 21, 2012, 05:32:35 AM
Shoutbox
   
 
[DevTeam] [Zeke]: I love that I get emailed when someone reports spam on the boards, but I can't do anything about it.
[DevTeam] [Nachonut]: lol i got you
[DevTeam] [Astaldo]: How about "hide email address from public checked" and it's still visible in all my posts...
[DevTeam] [Astaldo]: I'd delete my account on this site, but by the time I realized the problem half the spambots on the planet had it already
[Developer] [Pazza]: Astaldo if you log out and view your profile with a refresh you'll see that your email is hidden.
[Developer] [Pazza]: Your user level on the forums permit you to see emails even though they are marked hidden.
[DevTeam] [Astaldo]: Ah.. thanks for the clarification and apologies for "crying wolf" in that case :
[DevTeam] [Kaidenn]: PAZZA! i miss you.
[DevTeam] [Nachonut]: Lol, it's funny how it takes spam message reports to get me to come back
[DevTeam] [sylvanaar]: Check out the beta tester forum. Need alpha testers and feedback so I can come up with a maintenance plan.
[Developer] [Pazza]: loaded some new spam prevention modules... lets see if this stops the bastards.
[DevTeam] [Maziel]: Thought I'd check in and say Howdy Doody from Australia
[DevTeam] [Maziel]: Yeah the spam from shoes salesmen was becoming insane
[Guest] [Delakando]: What ever happened to the ability to track friend's location by wim? Other then just showing their general zone location.
Zeke pokes his head around the corner.
[DevTeam] [Zeke]: Anybody home?
[Guest] [Theillur]: I would like to know if it is just me.
[Guest] [Theillur]: http://www.wimaddon.com/forums/index.php/topic,1796.0.html
[Guest] [Nev]: I'm here
[Guest] [Nev]: I don't think anyone else is though
[Guest] [tomasio]: great site [url=http://freeonlinemusicvideos.net].[/url] [url=http://freepeopleclothing.org].[/url]
[Guest] [Theillur]: Nev it is not working for Zeke as well.
[DevTeam] [lothaer]: im here
[DevTeam] [lothaer]: ...
lothaer yawns sleepily.
[DevTeam] [lothaer]: sooooooooooooooooo
[Guest] [j3ff]: Hello. It is very quiet. I would love a response to my thread directly below your "Been very quiet" thread!
[DevTeam] [lothaer]: Check out my new post in the Skins forum
[DevTeam] [lothaer]: Posted a new download in the skins forum check it out
[DevTeam] [lothaer]: Zeke, Maziel, Pazza, Nachonut, sylvanaar, Kaidenn, Astaldo where are you?
[DevTeam] [lothaer]: It would be a real shame if WIM was left to die.
[DevTeam] [lothaer]: i think these forums are dead, Sylvanaar dosnt post on them as he only bug fixes when possible. WIMs future isnt very bright
[Guest] [justgiz]: Yea, its rather sad.
[Guest] [silvercola]: I wish it had skype
[DevTeam] [lothaer]: noy possible for a addon to do.
[DevTeam] [lothaer]: ...........
[Guest] [elzershark]: where is the download file?
lothaer beckons everyone over to you.
[DevTeam] [lothaer]: has anyone been able to take WIM to the beta yet?
[DevTeam] [lothaer]: PTR*
[DevTeam] [Maziel]: *sticks head up and looks around*
lothaer cries.
[DevTeam] [lothaer]: who the hell flagged my post as spam?
[Guest] [primalforce]: Hey guys
[DevTeam] [lothaer]: hello Primalforce.
[DevTeam] [lothaer]: PAZZA COME BACK!!!
[DevTeam] [Nachonut]: Ahhh memories
[Guest] [Ignis]: wtb update
[DevTeam] [lothaer]: soooo.....
Pazza starts to complain... Kinda reminds you of Sloans dont it?
 
   
   
News: World of Warcraft v4.0.1
 
Pages: [1]
Print
Author Topic: [Accepted] Localisation for Date Formats  (Read 648 times)
halcinlatsmir
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 2


View Profile
« on: December 05, 2007, 08:24:45 AM »

Hi,

Would it be possible to introduce some date format customisation?  Currently WIM only shows dates in the MM/DD/YYYY format.  This is very confusing.  I would like to suggest an option to select one of the following formats:

DD/MM/YYYY
MM/DD/YYYY
YYYY/MM/DD


P.S. Great addon  Smiley
Logged
Pazza
Administrator
Hero Member
*****

Karma: +89/-15
Offline Offline

Posts: 1375


Effin A


View Profile WWW
« Reply #1 on: February 15, 2008, 03:24:33 PM »

I am going to bump this just so I can remember to get to it. I am not sure how I am going to implement this yet. Unfortunately when I coded it, it was hard coded. Sorry. American ignorance if you may.

I promise I will get to it however.
Logged

My hobbies consume way too much time :-).
Steve
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 11



View Profile
« Reply #2 on: February 16, 2008, 07:15:40 PM »

From what I can tell there are two options:

(1) Since the dates are static and in a single variable, there's not really a more generic format you could save them in, the only way to optimize speed at the cost of memory would be to put d/m/y in an array for each saved date.  The best way I can think of to do this would be to give them an option window on the first new load asking them if they would like to change their date format.  If they chose to, on the first date change, it would go through all saved dates and change them to an array format (in favor of saving processing time for later history viewing), set a variable to save that the old dates have been updated, and proceed with saving dates in this new format.  If they chose no, it would continue with the old format until they chose to update.  As you can see, this is a lot of work.

(2) The much easier way of handling this situation is to continue saving dates in the old format, and just change them to the new format when it's time for the date to be displayed.  This would slightly lengthen processing time to generate the history since this option uses the string library, but would be overall easier for the user and easier for you (neglecting the extra processing time for viewing history).  To do this option, all that needs to be done is to add an option for date format, add a simple function to change the date format, and update 5 lines in WIM_History.lua.

Here's a sample of idea 2 (minus the new option in the options menu):
Code:
function WIM_NewDate(olddate)
local d = string.sub(olddate, 4, 5)
local m = string.sub(olddate, 1, 2)
local y = string.sub(olddate, 7, 8)

if (WIM_Data.DateFormat == 0) then
return olddate;
elseif (WIM_Data.DateFormat == 1) then
return d.."/"..m.."/"..y;
elseif (WIM_Data.DateFormat == 2) then
return y.."/"..m.."/"..d;
end
end
and update lines 64, 135, 137, 139, 141 in WIM_History.lua


Or then again, maybe you can think of a better way to handle date formats Smiley.
Only you can decide.

EDIT:  when you add a localized date option, you should include an option to select whether you want "-" or "/" to separate the date.
Logged
Pazza
Administrator
Hero Member
*****

Karma: +89/-15
Offline Offline

Posts: 1375


Effin A


View Profile WWW
« Reply #3 on: February 16, 2008, 09:04:54 PM »

My burden is where to put these options... lol. WIM has gotten quite bloated with options. I either need to redesign my options window or start removing some obvious options. /Shrug. I'll figure somthing out...

To be honest, I was thinking of taking the route of adding a varible in the localization files where our translators can just supply their countries standard of date formatting.

Options are great, but sometimes... eh... too many can be annoying. for the user and the developer.

Thanks for your ideas. I would probably take the second route that you suggested.
Logged

My hobbies consume way too much time :-).
Pages: [1]
Print
Jump to:  

You must be logged in to send a message to the shout box.
     
  test stamp