Is there a way to get rid of the point after the month in this pattern? (MMM dd, yyyy) it is not there in the format but it appears in the console.
output in console == AUG. 18, 2013
The solution is accepted with the point,
Just curious about the possibilities.
extra information
Wordt bediscussieerd
Opmerkingen (5)
- Populair
- Nieuw
- Oud
Je moet ingelogd zijn om opmerkingen te kunnen maken
CyDraLe
18 August 2022, 21:54
Thanks guys,
Now i know what causes this peculiarity.
So there is a disadvantage to living in Belgium🤣🤣🤣
I will try to convince my pc that i am native dutch speaking instead of French speaking, In the end it does not really matter .
0
Thomas
17 August 2022, 13:46nuttig
try the US locale....
or set en-US as default lang in the class
+2
Guadalupe Gagnon
17 August 2022, 13:46nuttig
Most likely this is just the local language settings on your computer. Take this little bit of code as an example:
Using the same format but different languages you get different outputs. This code outputs:
English: 28-Oct-0021
French: 28-oct.-0021
I don't think there is a way to change that behavior, not one that I found anyways, but if you still want to use the local language you could always remove the period (or any unwanted formatting) using the replaceAll() method of the String class:
Which, if you output that result, would be:
AUG 18, 2013 +1
Thomas
17 August 2022, 13:48
hahaha, a second before me....
+1
Guadalupe Gagnon
17 August 2022, 13:48
🙃😅 I saw. Your comment posted almost immediately after I hit "Send"
0