John Mayer hit a major milestone that he kept under wraps for a year.

The 40-year-old announced on Tuesday that he had not had a drink in 365 days.

"One year ago today, I decided to give drinking a break. A very personal thing for everyone. For me, a constant return on investment," he wrote on Twitter. "I post this because I want people to know that 'that's enough for now' is on the menu, so to speak."

>> On Rare.us: Katy Perry had a run-in with her ex, John Mayer, and the timing seriously could not have been worse

In an interview with Rolling Stone, he said he had replaced drinking with smoking marijuana.

“I put it where drinking used to go, and the quality of life has gone up considerably. Drinking is a [expletive] 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?’” he said at the time.

Mayer maintained that he "never had a serious issue with it" but wanted to take a break. "There's never an amount that felt like I was succeeding at life. It always felt wrong."