"You must have resided in Canada for at least three years (1,095 days) in the past four years before you apply. This does not apply to children under 18.
You may be able to count time you spent in Canada before you became a permanent resident if it was during the past four years."
http://www.cic.gc.ca/english/citizenship/become-eligibility.asp