Java Date and Day
Submissions: 690   Accuracy:

38.36%

  Difficulty: Basic   Marks: 1

Java Calendar class is an abstract class that provides methods for converting date between a specific instant in time and a set of calendar fields such as MONTH, YEAR, HOUR, etc.

Given a date(dd mm yyyy) in form of string. Print the day at the given date.

For example, if the given date is MARCH 17th 2017 print the output as FRIDAY.

Image result for calendar 2017 march

Input: First line of input contains a single integer T which denotes the number of test cases. T test cases follows, first and the only line of each test case contains a string S(date). 

Output: Corresponding to each test case, print the required output.

Constraints:

1<=T<=100
2000<year<3000


Example:

Input:
2
17 03 2017
29 11 2021

Output:
FRIDAY
MONDAY

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: S_A
Author: saksham0751


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.