atsevan / garbagecat

Automatically exported from code.google.com/p/garbagecat
0 stars 0 forks source link

Not an issue, improvement of the GcUtil.getDatePlusTimestamp() #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is not a bug, just proposition of simplification of getDatePlusTimestamp() 
method.

Proposed version of method should work faster and does not create the Calendar 
objects in each call

-------------------------------------
public static final Date getDatePlusTimestamp(Date start, long timestamp) {

        long milis = start.getTime() + timestamp ;
        return new Date(milis) ;

    }
-------------------------------------

Original issue reported on code.google.com by jbor...@gmail.com on 27 Apr 2011 at 8:43

GoogleCodeExporter commented 9 years ago
Yes, much better.

Original comment by mgm...@gmail.com on 6 May 2011 at 6:56

GoogleCodeExporter commented 9 years ago
This has already been committed, the Issue should probably be closed.

Original comment by d...@sunsetutopia.com on 23 Oct 2012 at 4:45