The new show, which begins previews on March 16 at the August Wilson Theater before an April 17 opening, may well repeat the success of “Matilda”; when “Groundhog Day” had its premiere in London in August, Ben Brantley of The New York Times praised it as “a bright whirligig of a show.”

Mr. Rubin said he started being approached about stage adaptations 20 years ago, not long after the release of the movie in which Bill Murray plays a meanspirited weatherman, Phil, who relives the same day in Punxsutawney, Pa., over and over. Stephen Sondheim even expressed interest in the 2000s, before withdrawing. “In the press he said [the movie] was unimprovable,” Mr. Minchin recalled. “I don’t think art needs to be improvable. I don’t suppose ‘Les Misérables’ is an improvement on the Hugo [novel], but it’s brilliant.”

He paused, then added, chuckling, “I think ‘Jesus Christ Superstar’ is an improvement on the Bible.”

Still, he is aware that “Groundhog Day” has many fans ready to pounce on perceived betrayals. “I had to be careful because the movie is a bit of a sacred text, and I don’t really do sacred,” Mr. Minchin said. At least unlike the “Superstar” lyricist Tim Rice, who could not share notes with the Bible’s authors, he had a direct line to his source material in Mr. Rubin.

“I came in with a script and an outline and a lot of song ideas, and Tim came with the same thing,” Mr. Rubin said on the phone from his Santa Fe, N.M., home. “From that, we massaged the show together.”

By then, Mr. Minchin was used to high-stakes situations involving beloved sources. After all, this profanity-loving, eyeliner-wearing author of paeans to humanism and odes to sex dolls (“You don’t have problems with your weight at all/You never steal food from my plate at all/I never have to masturbate at all/Unstoppable, inflatable you”) was a risky choice for the Royal Shakespeare Company’s adaptation of “Matilda.” Yet his caustic sensibility turned out to be a perfect match for Dahl’s saccharine-free worldview. He wasn’t new to theater, either, having collaborated with youth companies in Perth, where he grew up.

“When I was 17, I rewrote the songs for a musicalized version of ‘Love’s Labour’s Lost,’” Mr. Minchin said. “The next year, I rewrote the songs to Brecht’s ‘Mother Courage.’ Then I finished my degree and said to Mom and Dad: ‘Can I have a year just doing theater? I’ll just wash dishes.’” He worked at a local cafe and wrote scores for shows such as “The Tempest.”