Example usage for java.time LocalDateTime withDayOfYear

List of usage examples for java.time LocalDateTime withDayOfYear

Introduction

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

Prototype

public LocalDateTime withDayOfYear(int dayOfYear) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDateTime a = LocalDateTime.of(2014, 6, 30, 12, 01);

    LocalDateTime t = a.withDayOfYear(2012);

    System.out.println(t);/*from www  . j a v a 2 s  .  c o m*/
}