Java Date Time - Java Calendar DAY_OF_WEEK_IN_MONTH








Syntax

Calendar.DAY_OF_WEEK_IN_MONTH has the following syntax.

public static final int DAY_OF_WEEK_IN_MONTH

Example

In the following code shows how to use Calendar.DAY_OF_WEEK_IN_MONTH field.

import java.util.Calendar;

public class Main {
  public static void main(String[] args) {
    Calendar now = Calendar.getInstance();
    System.out.println(now.getTime());
    System.out.println(now.get(Calendar.DAY_OF_WEEK_IN_MONTH));
  }
}

The code above generates the following result.