Set in rural Italy in 1347, “The Little Hours” strives for historical accuracy, from the costumes and settings to the musical score beneath the action.

Except, that is, when it comes to dialogue. These 14th-century characters — nuns, priests, noblemen, servants — converse in the most modern of idioms.

They swear like drunken sailors. They employ 20th-century phrases.

It’s the contrast between the visual authenticity and the film’s aural outrageousness that gives “Little Hours” — based on a raunchy story by Boccaccio — its comic oomph.

That and a handful of wickedly funny performances from a remarkably deep roster of players.

Mostly the yarn — written and directed by Jeff Baena, maker of the zombie comedy “Life After Beth” — is set in a convent where the fundamentally decent Mother Superior (Molly Shannon) has her hands full keeping peace among her brood of black-habited and foul- tempered nuns.

The snippiest of the bunch is Sister Fernanda (Aubrey Plaza), a explosively nasty woman with an unblinking death stare and a vocabulary capable of peeling paint.

Her cohort is the clumsy Sister Geneva (Kate Micucci), the convent’s gnomish tattletale, a snoop always eager to inform on her sisters.