Next: Timers, Previous: Processor Run Time, Up: System Interface [Contents][Index]

### 38.10 Time Calculations

These functions perform calendrical computations using time values (see Time of Day).

Function: time-less-p t1 t2

  This returns `t` if time value t1 is less than time value t2.

Function: time-subtract t1 t2

  This returns the time difference t1 âˆ’ t2 between two time values, as a time value.

Function: time-add t1 t2

  This returns the sum of two time values, as a time value. One argument should represent a time difference rather than a point in time. Here is how to add a number of seconds to a time value:

      (time-add time seconds)

Function: time-to-days time-value

  This function returns the number of days between the beginning of year 1 and time-value.

Function: time-to-day-in-year time-value

  This returns the day number within the year corresponding to time-value.

Function: date-leap-year-p year

  This function returns `t` if year is a leap year.