/* package whatever; // don't place package name! */
importjava.util.*;
importjava.lang.*;
importjava.io.*;
importjava.time.*;
importjava.util.stream.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
publicstaticvoid main (String[] args)throws java.lang.Exception
{
LocalDate start = LocalDate.parse("2023-01-03");
DayOfWeek dayOfWeek = start.getDayOfWeek();
LocalDate stop = start.withDayOfMonth(1).plusMonths(1);// Using Half-Open approach, running up to but not including first day of following month. End date is *exclusive* while the start date is *inclusive*.