Singer-songwriter John Mayer says he is celebrating a year of alcohol sobriety.

“One year ago today, I decided to give drinking a break,” Mayer, who turned 40 on Oct. 16, tweeted Tuesday. “A very personal thing for everyone. For me, a constant return on investment.”

Minutes later, however, he added, “I post this because I want people to know that ‘that’s enough for now’ is on the menu, so to speak.”

He had told Rolling Stone magazine in June that he’d substituted alcohol with marijuana. “I put it where drinking used to go, and the quality of life has gone up considerably,” he said. “Drinking is a . . . con. How much is enough? Every time I drank, I was looking for some sort of regulated amount. It always feels wrong for me. I always feel like I went overboard. ‘I said two, now it’s three, now we’re at four?’ I never had a serious issue with it,” he noted, “but I remember looking around going, ‘This feels rigged. I’m taking a break.’ There’s never an amount that felt like I was succeeding at life. It always felt wrong.”

He already had told The New York Times in March that, “I’m actually very thoughtfully entering cannabis life.”

Mayer — whose seven Grammy Awards include four for Best Male Pop Vocal Performance — has been touring heavily this year, both as a solo act in support of his seventh studio album, “The Search for Everything,” and as part of Dead & Company, centered around former Grateful Dead members Bob Weir, Mickey Hart and Bill Kreutzmann. Mayer, who has solo shows in Rio de Janeiro and Buenos Aires this Friday and Sunday, respectively, plays Madison Square Garden with Dead & Company on Nov. 12 and 14.