src/Date.cpp
/*!
    Returns the number of days in the month (28 to 31) for this date.

    Returns 0 if the date is invalid.

    \sa day(), daysInYear()
*/
Returns the number of days in the month (28 to 31) for this date.
Returns 0 if the date is invalid.


Returns the number of days in the month ( 28 to 31 ) for this date . Returns 0 if the date is invalid .
int Date::daysInMonth() const
{
    if (m_dt.mon == 2 && isLeapYear(m_dt.year))
        return 29;
    else 
        return monthDays[m_dt.mon];
}
int Date :: daysInMonth ( ) const { if ( m_dt . mon == 2 && isLeapYear ( m_dt . year ) ) return 29 ; else return monthDays [ m_dt . mon ] ; }
Returns the number of days in the month (28 to 31) for this date.
Returns the number of days in the month ( 28 to 31 ) for this date .