src/Date.cpp
/*!
    Returns the number of days in the year (365 or 366) for this date.

    Returns 0 if the date is invalid.

    \sa day(), daysInMonth()
*/
Returns the number of days in the year (365 or 366) for this date.
Returns 0 if the date is invalid.


Returns the number of days in the year ( 365 or 366 ) for this date . Returns 0 if the date is invalid .
int Date::daysInYear() const
{
    if (!isValid())
        return 0;
    return isLeapYear(m_dt.year) ? 366 : 365;
}
int Date :: daysInYear ( ) const { if ( ! isValid ( ) ) return 0 ; return isLeapYear ( m_dt . year ) ? 366 : 365 ; }
Returns the number of days in the year (365 or 366) for this date.
Returns the number of days in the year ( 365 or 366 ) for this date .