Java tutorial
import java.time.LocalDate; public class Main { public static void main(String[] args) { // Human Readable LocalDate date = LocalDate.now(); System.out.println(String.format("%s-%s-%s", date.getYear(), date.getMonthValue(), date.getDayOfMonth())); } }