Example usage for java.util GregorianCalendar setWeekDate

List of usage examples for java.util GregorianCalendar setWeekDate

Introduction

In this page you can find the example usage for java.util GregorianCalendar setWeekDate.

Prototype

@Override
public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) 

Source Link

Document

Sets this GregorianCalendar to the date given by the date specifiers - weekYear , weekOfYear , and dayOfWeek .

Usage

From source file:Main.java

public static void main(String[] args) {

    GregorianCalendar cal = (GregorianCalendar) GregorianCalendar.getInstance();

    System.out.println(cal.getTime());

    cal.setWeekDate(2013, 1, 3);

    System.out.println(cal.getTime());

}