TORONTO -- Canada's Senate approved a landmark bill Tuesday to legalize recreational use of marijuana. Now that the bill has passed, Prime Minister Justin Trudeau and his Cabinet will set a date for the law to go into effect.

The bill passed in the Senate by a vote of 52-59.

Trudeau's government had hoped to make pot legal by July 1, but the government has said provincial and territorial governments will need eight to 12 weeks following Senate passage and royal assent to prepare for retail sales. Trudeau's Cabinet is expected to decide a legalization date in early or mid-September.

Get Breaking News Delivered to Your Inbox

The law makes Canada the second country to have a nationwide, legal marijuana market, after Uruguay. This also makes Canada the first G7 country to legalize marijuana.

Each province in Canada is coming up with rules for the sale of recreational pot.

BBC News reports that Canadians will most likely be able to buy cannabis and cannabis oil grown by licensed producers at various retail locations. Adults will be able to possess up to 30 grams (1 ounce) of dried cannabis in public.