Calendar related

Calendar c = Calendar.getInstance();
c.add(Calendar.YEAR, -1);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);

c.getTime();

Date.from(LocalDate.now().minusYear(1L).atStartOfDay(ZoneId.systemDefault().toInstant());

Recommended Posts

Calendar related
Easy calendar
Java related summary
[Note] SQLite related
Date () and Calendar ()
Graal related notes