nstcl  >  Documentation  >  nstcl-time  >  num_days_difference

Tcl Powered!

num_days_difference

NAME

num_days_difference — Calculates the number of days of difference between two dates

SYNOPSIS

package require nstcl-time ?1.0.1?
package require nstcl ?1.0?

::nstcl::num_days_difference ?-absolute_value? ?-floor floor? ?-ceiling ceiling? x y

DESCRIPTION

This function calculates the number of days difference between two dates, x and y. Each date should be either an integer (the number of seconds since the epoch), or, a date (relative or absolute) in a format parseable by [clock scan].

OPTIONAL SWITCHES

-absolute_value
If this switch is present, and the result is a negative number, then the absolute value will be returned instead.
-floor
If a value for floor is given, and the calculated result is less than floor, then floor will be returned instead.
-ceiling
If a value for ceiling is given, and the calculated result is more than ceiling, then ceiling will be returned instead.

KEYWORDS

nstcl, time