Illuminatiiiiii
3/2/2019 - 10:26 PM

Date

import java.util.Date;

public class Main {

    public static void main(String[] args) {

        Date rightNow = new Date(); //No constructors means get current data
        Date birthday = new Date(1312321312312L); //Specify a date with the # of milliseconds after Jan 1, 1970

        System.out.println(rightNow.after(birthday));
        System.out.println(birthday.before(rightNow));
        
        //Compare two dates
        System.out.println(rightNow.compareTo(birthday));

        System.out.println(rightNow); //Output a date
        System.out.println(rightNow.getTime()); //See the milliseconds

    }
}