Artefaqs Corporation Posted March 9, 2016 Posted March 9, 2016 It would be nice if numbers, like post tallies and such, were run through number_format() so that they look correct. It's OK to just push out the raw number when your forum has 11 or 15 posts. But when you get to 583,382, the commas (or whatever your particular geography uses) are essential. The bonus is that number_format() automatically changes based on server location (assuming it was set up correctly), so IPS doesn't have to bother parsing commas versus periods or parenthesis.
Mark Posted March 9, 2016 Posted March 9, 2016 They should be. can you point out anywhere that isn't?
Colonel_mortis Posted March 9, 2016 Posted March 9, 2016 1 hour ago, Mark said: They should be. can you point out anywhere that isn't? Using the default EN-US locale (as bundled with Debian at least), there is no thousands separator set. Can you please not rely on locales to set date and number formats - there is no locale, and I did look quite hard, that uses the only logical date format to use online, "9(th) March 2016", and it's entirely plausible that, even if the language pack did come bundled with a thousands separator, you might want to change it - in Europe, they tend to use . as a thousands separator and , as a decimal separator, whereas space or ' would be unambiguous.
Mark Posted March 9, 2016 Posted March 9, 2016 On this site it seems to be working fine: We use locales to format this data because, as you correctly point out, the correct format depends where you are.
Colonel_mortis Posted March 9, 2016 Posted March 9, 2016 14 minutes ago, Mark said: On this site it seems to be working fine: We use locales to format this data because, as you correctly point out, the correct format depends where you are. Yes, but this site is running on AWS, so I suspect you have a different language pack. The en-us language pack available for Debian Jessie does not include a thousands separator. The correct format does indeed depend on where you are. However, a significant number (probably the majority, but I don't have any statistics to support that) of sites running a forum will be international. Date formats should be ambiguous - I hate finding a website that uses an ambiguous format and having to figure out what format it is probably in so that I can understand the dates. You have avoided ambiguous dates for most of the site by using relative dates and falling back to dd MMMM (YYYY) when that is too long ago, so why not just switch in the few places that still use the locale's default format? %d %b %y => 06 Mar 16, which is shorter than 03/06/2016. You can still truncate it further to Mar 16, as you already do (or at least have the HTML to support) with relative formats. For date inputs in browsers that don't natively support them, ideally it would be possible to select the date format, so that the admin can select YYYY-MM-DD on international sites. There are no English locales that support the unambiguous, universally understood, date formats.
Adriano Faria Posted March 9, 2016 Posted March 9, 2016 My language doesn't has a thousand separator, so I did this and works fine:
Artefaqs Corporation Posted March 11, 2016 Author Posted March 11, 2016 It does not in my installation, upgraded by IPS just this week.
Mark Posted March 11, 2016 Posted March 11, 2016 If it doesn't seem to be working for you, please submit a support request and we can take a look
Recommended Posts
Archived
This topic is now archived and is closed to further replies.