Example usage for java.time OffsetDateTime withDayOfYear

List of usage examples for java.time OffsetDateTime withDayOfYear

Introduction

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

Prototype

public OffsetDateTime withDayOfYear(int dayOfYear) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    OffsetDateTime o = OffsetDateTime.now();
    OffsetDateTime d = o.withDayOfYear(123);
    System.out.println(d);//from w w  w . j av a 2  s . c o m
}