Urine is considered sterile, but feces carries the risk of spreading disease. In essence, composting diapers is similar to some designs of composting toilets.
From
http://greywateraction.org/content/about-composting-toilets "The Arbor Loo, pioneered by Peter Morgan, a simple composting toilet with a portable slab, seat, and shelter, is gaining popularity in Zimbabwe and throughout Africa. A shallow pit (three to five feet deep) is dug in the ground with a protective lining that prevents the pit from collapsing. A movable shelter is located on top of the pit. Wood ash and soil are added after each use to help the decomposition process. When the pit is three quarters full, the slab and shelter are moved and mounted over another shallow pit. The full pit is topped off with six inches of soil, a young tree is planted over the contents, and the cycle is repeated. Fruit trees, like citrus, peach, mango, avocado, mulberry, guava, and papaya trees have all grown vigorously atop Arbor Loos, fostering local food secuity."
That's just to say that it's been done before, but I'm not sure if enough research has been done (or could be done, since microbial growth changes depending upon heat and location) that will tell you how long to wait.