package su.xserver.iikocon.test;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class DateRangeSetup {
  public static void main(String[] args) {

    // Вычисление dateFrom и dateTo
    LocalDate today = LocalDate.now();
    LocalDate dateFrom = today.minusDays(7);

    // Форматирование дат в YYYY-MM-DD
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    String formattedDateFrom = dateFrom.format(formatter);
    String formattedDateTo = today.format(formatter);

    System.out.println("dateFrom=" + formattedDateFrom);
    System.out.println("dateTo=" + formattedDateTo);
  }
}
