Uber (UBER) - Get Report and Lyft (LYFT) - Get Report had a rough run in May in New York City, according to data from the city's Taxi and Limousine Commission analyzed by Bloomberg.

Both ride-hailing services saw declines during the month.

Part of the reason for the decline could be the legislation the city passed in December, setting minimum-wage rules for the companies' drivers and leading to higher prices for passengers. 

Lyft made 4.7 million trips in May, about 17,000 fewer than its peak in March, while Uber reported an 8% decline in May from the number of rides it logged in March, Bloomberg reported.

Uber shares rose 1.23% Monday while Lyft shares rose 0.84% in trading.