Example usage for java.time ZonedDateTime withDayOfYear

List of usage examples for java.time ZonedDateTime withDayOfYear

Introduction

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

Prototype

public ZonedDateTime withDayOfYear(int dayOfYear) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    ZonedDateTime dateTime = ZonedDateTime.now();
    ZonedDateTime n = dateTime.withDayOfYear(14);
    System.out.println(n);/*w  w  w  .  j  a  v a  2 s . co  m*/
}