Is there a reliable way I can get the current date without time regardless of locale?
If I use .toGMTString() I get it in this format : EEE MMM dd HH:mm:ss z yyyy
I need it to work regardless of country so in the UK it would be DD/MM/YYYY but in the us MM/DD/YYYY
I’m sure there must be a really easy way to do this but can I find it?!
Use
SimpleDateFormat. Code sample.This would return Thu Aug 25 2011 for today’s date.