I need to know if there is something like a timespan in android development?
in C# there is something like and I like to use it in two ways:
public long addSeconds(long dt,int sec) //method to add seconds in time
{
Date Dt = new Date(dt);
Calendar cal = new GregorianCalendar();
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss");
sdf.setCalendar(cal);
cal.setTimeInMillis(Dt.getTime());
cal.add(Calendar.SECOND, sec);
return cal.getTime().getTime();
}
pass date and time in sec, it will return modified time...