Example usage for java.time LocalDate withDayOfYear

List of usage examples for java.time LocalDate withDayOfYear

Introduction

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

Prototype

public LocalDate withDayOfYear(int dayOfYear) 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    LocalDate a = LocalDate.of(2014, 6, 30);
    LocalDate b = a.withDayOfYear(100);
    System.out.println(b);//from w  w  w .  j  a v a  2s.  c  o m
}

From source file:com.jscriptive.moneyfx.ui.chart.ChartFrame.java

private void handleYearlyInOutChartMouseClickEvent(Account account, LocalDate year, MouseEvent event) {
    if (event.getClickCount() == 2) {
        TransactionFilter filter = new TransactionFilter(account, null, null,
                new ValueRange<>(year.withDayOfYear(1), year.withDayOfYear(1).plusYears(1).minusDays(1)),
                new ValueRange<>(null, null), new ValueRange<>(null, null));
        chartFrame.getScene().lookup("#tabPane").fireEvent(new ShowTransactionsEvent(filter));
    }/*from w w  w.  j  a  v  a  2  s. c  o  m*/
}