Is there a Java package with all the annoying time constants like milliseconds/seconds/minutes in a minute/hour/day/year? I\'d hate to duplicate something like that.
If the constants are to be used as Compile-time constants (for example, as an attribute in an annotation), then Apache DateUtils will come in handy.
import org.apache.commons.lang.time.DateUtils;
DateUtils.MILLIS_PER_SECOND
DateUtils.MILLIS_PER_MINUTE
DateUtils.MILLIS_PER_HOUR
DateUtils.MILLIS_PER_DAY
These are primitive long constants.