You (and any minors applying with you) must have been physically present in Canada for at least 1,095 days (3 years) within the 5 years immediately before the date you sign your application. We recommend applying with a comfortable buffer above 1,095 days in case of discrepancies.
Time spent in Canada as a temporary resident before becoming a permanent resident counts as half a day each, up to a maximum of 365 credited days.