Skip to content

Latest commit

 

History

History

Java Date and Time

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Java HackerRank

Difficulty Max Score Success Ratio
Easy 15 92.44%

The Calendar class is an abstract class that provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on, and for manipulating the calendar fields, such as getting the date of the next week.


You are given a date. You just need to write the method, [SVG image] , which returns the day on that date. To simplify your task, we have provided a portion of the code in the editor.

Example

[SVG image]

[SVG image]

[SVG image]

The method should return [SVG image] as the day on that date.

image

Function Description

Complete the findDay function in the editor below.

findDay has the following parameters:

  • int: month
  • int: day
  • int: year

Returns

  • string: the day of the week in capital letters Input Format

A single line of input containing the space separated month, day and year, respectively, in [SVG image] [SVG image] [SVG image] format.

Constraints

  • [SVG image] Sample Input
08 05 2015

Sample Output

WEDNESDAY

Explanation

The day on August [SVG image] th [SVG image] was WEDNESDAY.

💡 Hints

➡️ Approach

✅ Detailed Solution

View Solution : Java Date and Time

Submissions Leaderboard Discussions Editorial
📝 My Submission 🏆 Track our position 🤔 Help from Community ✍️ Editorial