Java tutorial
import java.time.LocalDateTime; public class Main { public static void main(String[] args) { LocalDateTime timePoint = LocalDateTime.now(); LocalDateTime thePast = timePoint.withDayOfMonth(10).withYear(2010); System.out.println(thePast); } }