src/Date.cpp
/*!
    Returns the number of days from this date to \a d (which is
    negative if \a d is earlier than this date).

    Returns 0 if either date is invalid.
*/
Returns the number of days from this date to \a d (which is
negative if \a d is earlier than this date).

Returns 0 if either date is invalid.
Returns the number of days from this date to \ a d ( which is negative if \ a d is earlier than this date ) . Returns 0 if either date is invalid .
std::int64_t Date::daysTo(const Date& d) const
{
    if (!isValid())
        return 0;
    else
        return toJulianDay() - d.toJulianDay();
}
std :: int64_t Date :: daysTo ( const Date & d ) const { if ( ! isValid ( ) ) return 0 ; else return toJulianDay ( ) - d . toJulianDay ( ) ; }
Returns the number of days from this date to \a d (which is
negative if \a d is earlier than this date).
Returns the number of days from this date to \ a d ( which is negative if \ a d is earlier than this date ) .