Timeline for Format an integer with space as thousand separator
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 23, 2022 at 11:53 | vote | accept | Ola Ström | ||
Feb 19, 2022 at 12:00 | history | tweeted | twitter.com/StackCodeReview/status/1495005247617523712 | ||
Feb 18, 2022 at 22:44 | history | became hot network question | |||
Feb 18, 2022 at 21:41 | history | edited | 200_success | CC BY-SA 4.0 |
edited body; edited tags; edited title
|
Feb 18, 2022 at 19:08 | comment | added | Eric Stein |
Use the existing libraries: DecimalFormatSymbols dfs = new DecimalFormatSymbols(); dfs.setGroupingSeparator(' '); DecimalFormat df = new DecimalFormat("#,###", dfs); System.out.println(df.format(-1000));
|
|
Feb 18, 2022 at 17:35 | comment | added | Ola Ström | No regional preferences, always space in between no matter what. | |
Feb 18, 2022 at 17:29 | comment | added | Reinderien | Is this a regional preference? If so, for what country and language? | |
Feb 18, 2022 at 17:24 | answer | added | Ralf Kleberhoff | timeline score: 6 | |
Feb 18, 2022 at 16:01 | comment | added | Ola Ström |
@Mast: String.format("%,d\n", number).toString(); would return 123,456 or 123.456 or something language specific, not 123 456 as I want.
|
|
Feb 18, 2022 at 15:32 | history | edited | BCdotWEB | CC BY-SA 4.0 |
edited title
|
Feb 18, 2022 at 15:14 | comment | added | Mast♦ |
How is this different from System.out.printf( "%,d\n", number); ?
|
|
S Feb 18, 2022 at 14:42 | review | First questions | |||
Feb 18, 2022 at 16:54 | |||||
S Feb 18, 2022 at 14:42 | history | asked | Ola Ström | CC BY-SA 4.0 |