Java tutorial
//package com.java2s; import java.util.Date; public class Main { private static int getAge(Date lastUpdate) { return (int) ((new Date().getTime() - lastUpdate.getTime()) / 1000); } }