Calculating MONTH and DATE
month = 0 NEW_LINE index = 0 NEW_LINE if ( flag == 1 ) : NEW_LINE INDENT while ( True ) : NEW_LINE INDENT if ( index == 1 ) : NEW_LINE INDENT if ( extraDays - 29 < 0 ) : NEW_LINE INDENT break NEW_LINE DEDENT month += 1 NEW_LINE extraDays -= 29 NEW_LINE DEDENT else : NEW_LINE INDENT if ( extraDays - daysOfMonth [ index ] < 0 ) : NEW_LINE INDENT break NEW_LINE DEDENT month += 1 NEW_LINE extraDays -= daysOfMonth [ index ] NEW_LINE DEDENT index += 1 NEW_LINE DEDENT DEDENT else : NEW_LINE INDENT while ( True ) : NEW_LINE INDENT if ( extraDays - daysOfMonth [ index ] < 0 ) : NEW_LINE INDENT break NEW_LINE DEDENT month += 1 NEW_LINE extraDays -= daysOfMonth [ index ] NEW_LINE index += 1 NEW_LINE DEDENT DEDENT