Getting caught with a small plastic bag of marijuana in Maryland used to carry the risk of both criminal charges and jail time. But once the clock struck midnight, Maryland’s decriminalization law took effect, replacing criminal charges, in most cases, with a civil citation and a fine — similar to getting a parking ticket.

The law is one of hundreds that, as of the first day of October, are on the books in Maryland, the District and Virginia.

D.C. residents now have a 5.75 percent sales tax on gym memberships, yoga classes, car washes and deliveries of bottled water, among other services. At the same time, the city will give its employees up to eight weeks of paid leave after the birth or adoption of a child or when an employee must look after a family member with a serious health condition.

Virginia’s new laws include one addressing the social history of minors who are being considered for placement in a juvenile correctional facility. And the minimum wage in Montgomery and Prince George’s counties has increased to $8.40 per hour, part of a regional effort to gradually grow baseline pay so it reaches $11.50 by 2017.

Preparation for pot decriminalization in Maryland — a change that recently happened in the District — hasn’t been simple.

Prosecutors and police had to make several decisions: How will officers determine the weight of the marijuana they discover? What happens if they arrest someone for having more than 10 grams only to discover at the station that it was less? And given that it is still a criminal offense to carry drug paraphernalia — including bongs, pipes and rolling papers — should officers use that charge against suspected drug offenders instead?

The Governor’s Office of Crime Control and Prevention, with help from Maryland State Police and the Attorney General’s Office, state conducted training sessions for local law enforcement officers. Maryland State Police drafted a new policy but the agency is encouraging barracks commanders to work closely with prosecutors, said spokesman Gregory Shipley.

“That way, we’re not charging someone who’s going to not be prosecuted,” Shipley said. “We know there may be some differences.”

State troopers will use their best judgment in guessing the weight of marijuana, Shipley said, since “the troopers won’t be carrying scales.” If it looks like less than 10 grams, troopers will issue a civil citation. If it looks like more than that, troopers will make an arrest and head to a station for an official weighing. If the trooper guessed wrong, the arrested individual will be released and issued a civil citation.

Under federal law, possession of any amount of marijuana is still illegal. And in Maryland, because of the danger the drug poses to young, developing brains, those under 21 who are accused of having less than 10 grams will have to pay a fine and attend a drug education program. For second and third offenses, the penalties escalate.

Here are some of the other new laws in Maryland:

●Transgender individuals have new civil rights protections under the Fairness for All Marylanders Act of 2014. The law includes an exemption for religious organizations, private clubs and educational institutions.

●Drivers who cause a serious crash while distracted by a cellphone face higher penalties: up to one year in jail, a fine of up to $5,000 and 12 points on his or her driver’s license, the point at which it can be revoked. The penalties are part of what has been called “Jake’s Law,” in memory of a 5-year-old from Baltimore killed in 2011.

●A package of laws targeting domestic violence will make it easier for victims to obtain protective orders and allow judges to impose harsher sentences for violence committed in front of children.

●Laws aimed at reducing corruption in corrections facilities and the number of contraband cellphones in Maryland jails will also take effect, including one that allows the immediate suspension of prison guards caught sneaking in contraband.

“Revenge porn” — when a person posts a sex tape online or circulates intimate photos to embarrass or harm a former partner — is illegal, punishable by up to two years in jail and a fine of up to $5,000.

●Drunk drivers and those convicted of alcohol-related offenses while driving with a child under age 16 will have to install an ignition interlock system in their vehicles that will prevent them from driving if they have been drinking.

●Maryland has also implemented a “Good Samaritan” law, which gives some immunity from criminal prosecution to a person who alerts authorities to a medical emergency resulting from a drug or alcohol overdose.

●Drivers will face a fine of up to $500 if they do not move over a lane when they see a tow truck on the side of a highway.

In the District, a family-leave benefit fulfills a campaign promise Mayor Vincent C. Gray (D) made in the spring, before he lost the Democratic primary and his bid for a second term Gray said he learned from employees in his office that the city did not offer paid maternity or paternity leave. According to city statistics, fewer than 16 percent of state and local governments offer paid parental or family leave to employees; 12 percent of private sector employers offer it.

The city’s “yoga tax” was a hotly debated part of a tax package approved by the D.C. Council. The expansion of the sales tax inches up D.C. residents’ overall tax bills before broader income-tax, business-tax and other cuts take effect, likely within two years.

In Virginia, one new law requires judges to review and consider the social history of a minor before ordering the minor to be committed to the Department of Juvenile Justice for placement in a juvenile correction center.

Another new law requires the state to conform with federal guidelines when dealing with landowners who voluntarily sell their property to the government for transportation projects.

Aaron C. Davis and Jenna Portnoy contributed to this report.