Package g1101_1200.s1185_day_of_the_week
Class Solution
java.lang.Object
g1101_1200.s1185_day_of_the_week.Solution
1185 - Day of the Week.<p>Easy</p>
<p>Given a date, return the corresponding day of the week for that date.</p>
<p>The input is given as three integers representing the <code>day</code>, <code>month</code> and <code>year</code> respectively.</p>
<p>Return the answer as one of the following values <code>{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> day = 31, month = 8, year = 2019</p>
<p><strong>Output:</strong> “Saturday”</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> day = 18, month = 7, year = 1999</p>
<p><strong>Output:</strong> “Sunday”</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> day = 15, month = 8, year = 1993</p>
<p><strong>Output:</strong> “Sunday”</p>
<p><strong>Constraints:</strong></p>
<ul>
<li>The given dates are valid dates between the years <code>1971</code> and <code>2100</code>.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
dayOfTheWeek
-