Example usage for java.time ZonedDateTime withDayOfMonth

List of usage examples for java.time ZonedDateTime withDayOfMonth

Introduction

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

Prototype

public ZonedDateTime withDayOfMonth(int dayOfMonth) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ZonedDateTime n = dateTime.withDayOfMonth(14);
    System.out.println(n);/*  www.  ja va  2s .  c o  m*/
}