String m = Integer.toString(month); String d = Integer.toString(day); String y = Integer.toString(year); String providedDate = d+"-"+m+"-"+y; SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyy"); try { Date date = format.parse(providedDate); // getting day from the date String actualDay = new SimpleDateFormat("EEEE").format(date); return actualDay.toUpperCase(); } catch(ParseException e) { System.out.print(e); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter