.getMinimum()
Published Sep 17, 2023
Contribute to Docs
The .getMinimum()
method of the Calendar
class returns the minimum value for the given calendar field.
Syntax
calendar.getMinimum(field)
Where the field
parameter is the calendar field, for example Calendar.HOUR_OF_DAY
.
Example
In the following example, .getMinimum()
returns the minimum value for the Calendar.DAY_OF_WEEK
field.
import java.util.Calendar;public class Main {public static void main(String[] args) {Calendar calendar = Calendar.getInstance();System.out.println(calendar.getMinimum(Calendar.DAY_OF_WEEK));}}
Output for the above code will be:
1
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.