In Canada, for less serious crimes that are punishable by summary conviction, the police must charge you within 6 months of the date of your offence. Most crimes can be prosecuted either summarily or by way of indictment.
The decision of whether a crime is a summary offence or indictable offence is either described by the Criminal Code of Canada or decided by the crown prosecuting the case. If an offence falls outside the 6 months, unless it is a straight summary offence (rare) the crown can simply decide to proceed by way of indictment. They will often ask the accused if they are willing to agree to it proceeding summarily even if it has been more than 6 months as summary offences come with lesser maximum sentences, so it is likely in the accused interest to agree.
However, if they do charge you, you have a constitutional right to be tried within a reasonable time. A “reasonable” time between the charge and the trial is 18 months in a Provincial court, or 30 months in Superior Court.