Example usage for java.text DateFormat DAY_OF_WEEK_IN_MONTH_FIELD

List of usage examples for java.text DateFormat DAY_OF_WEEK_IN_MONTH_FIELD

Introduction

In this page you can find the example usage for java.text DateFormat DAY_OF_WEEK_IN_MONTH_FIELD.

Prototype

int DAY_OF_WEEK_IN_MONTH_FIELD

To view the source code for java.text DateFormat DAY_OF_WEEK_IN_MONTH_FIELD.

Click Source Link

Document

Useful constant for DAY_OF_WEEK_IN_MONTH field alignment.

Usage

From source file:Main.java

public static void main(String[] argv) throws Exception {
    DateFormat dateFormat = DateFormat.getDateInstance();
    StringBuffer sb = new StringBuffer();

    sb = dateFormat.format(new Date(), sb, new FieldPosition(DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD));
    System.out.println(sb);//from   ww  w.j a  va  2s. c  o m

}