Example usage for java.time LocalDateTime getDayOfYear

List of usage examples for java.time LocalDateTime getDayOfYear

Introduction

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

Prototype

public int getDayOfYear() 

Source Link

Document

Gets the day-of-year field.

Usage

From source file:Main.java

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

    System.out.println(a.getDayOfYear());
}

From source file:nl.utwente.ewi.caes.tactiletriana.simulation.devices.UncontrollableLoad.java

@Override
public void tick(Simulation simulation, boolean connected) {
    super.tick(simulation, connected);
    LocalDateTime t = simulation.getCurrentTime();
    int minuteOfYear = t.getDayOfYear() * 24 * 60 + t.getHour() * 60 + t.getMinute();
    setCurrentConsumption(profile[profileNumber][minuteOfYear]);
}