I have objects of Date type.
I want to compare them, and I have written an if condition in the following way:
if (([startDate1 isEqualToDate:[self getDefaultDate]]) || (startDate1 != [ self getDefaultDate] && m_selectedDate >= m_currentDate1 && cycleStopped))
{
///execute some condition
}
Am I right or wrong in this approach?
One more thing. Is this way right:
if (dtdate > [m_array objectatIndex:i]
{
}
Because I am getting random behavior.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…