Example usage for java.time ZonedDateTime withMonth

List of usage examples for java.time ZonedDateTime withMonth

Introduction

In this page you can find the example usage for java.time ZonedDateTime withMonth.

Prototype

public ZonedDateTime withMonth(int month) 

Source Link

Document

Returns a copy of this ZonedDateTime with the month-of-year altered.

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    dateTime = dateTime.withMonth(2);
    System.out.println(dateTime);
}