Code example for Date

Methods: getMonthgetTimesetMonth

0
        return System.currentTimeMillis();
    } 
 
    /** Returns unixtime one month from now */ 
    public static final long oneMonthFromNow() { 
        Date date = new Date();
        date.setMonth(date.getMonth() + 1);
        return date.getTime();
    } 
 
    /** Represents a single hour */ 
    public static final long ONE_HOUR = 3600000L;
 
    /** Represents a single day */ 
    public static final long ONE_DAY = 24 * ONE_HOUR;
 
    /** Represents a single week */ 
    public static final long ONE_WEEK = 7 * ONE_DAY;
 
    /** Represents a single minute */ 
    public static final long ONE_MINUTE = 60000L;