This should display 'Tue':
new SimpleDateFormat("EEE").format(new Date());
This should display 'Tuesday':
new SimpleDateFormat("EEEE").format(new Date());
This should display 'T':
new SimpleDateFormat("EEEEE").format(new Date());
So your specific example would be:
new SimpleDateFormat("yyyy-MM-EEE").format(new Date());
Answer from Nathan Feger on Stack OverflowThis should display 'Tue':
new SimpleDateFormat("EEE").format(new Date());
This should display 'Tuesday':
new SimpleDateFormat("EEEE").format(new Date());
This should display 'T':
new SimpleDateFormat("EEEEE").format(new Date());
So your specific example would be:
new SimpleDateFormat("yyyy-MM-EEE").format(new Date());
Yep - 'E' does the trick
http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
Date date = new Date();
DateFormat df = new SimpleDateFormat("yyyy-MM-E");
System.out.println(df.format(date));
Videos
For example, today is Monday, 2023-07-31. Is this correct, or is there a different way?
Edit: How is the time included as well?
Ahh! I’ve kept a journal since I was maybe 8 years old. Kept it up through my teen years and nearly all the way through my 20s . I’m trying to teach myself the correct grammar and spelling , so I’m trying to be more precise even when I journal! However … google could not answer this one for me . lol I know it is different in other countries as well. But just curious if anyone else here knew the correct way , or wanted to share how they date their journals . 😊
It would also be at the beginning: Monday, 24 February 2014. I don't have a reference for you, but if you read enough BBC news articles, you'll come across it eventually.
The 7th bullet here:
http://en.wikipedia.org/wiki/Calendar_date#Gregorian.2C_day-month-year_.28DMY.29
"Sunday, 8 November 2003"