I agree with guildsbounty that this is firmly in house rule territory. Allowing partial training in a class is a slippery slope toward player abuse. A player could make the argument that other party members are training them in their class in order to gain some minor abilities from that class, such as cantrips, extra skills, etc. without having to take an entire level in that class.
That said, you could extrapolate the likely progression of training from a raw recruit to a 1st level character. Start by taking a look at everything the class grants at 1st level and lay it all out in individual pieces. For the cleric, it looks like this (yes, there are duplicates for a reason):
- 1 hit die (d8, 8 HP + Con mod)
- Armor: Light Armor
- Armor: Medium Armor
- Armor: Shields
- Weapons: Simple Weapons
- Skills: One of History, Insight, Medicine, Persuasion, and Religion
- Skills: One of History, Insight, Medicine, Persuasion, and Religion
- Proficiency Bonus +1
- Proficiency Bonus +1
- Spellcasting
- Divine Domain
- 1 Cantrip
- 1 Cantrip
- 1 Cantrip
- 1 1st-Level Spell
- 1 1st-Level Spell
These tend to organize themselves into three separate chunks: arms and armor, skills, and spellcasting. Each has a fairly clear progression of abilities that would need to be learned in a particular order. Proficiency doesn't have a solid home, so I'd put the first point at the end in the first group trained and the second at the end of the last. The hit die would be gained upon full completion.
Now, we just need to establish how long each piece takes to learn. Going by the 3.5e/Pathfinder age chart, it takes 2-12 (avg 7) years to fully become a 1st level cleric. Assuming some sort of scholastic/monastic center for training, each of the three groups could be trained roughly simultaneously. Taking the average time to completion, it follows that it would take 1 year to learn spellcasting at all and another year to master the first cantrip.
Learning in the field during downtime should limit training to a single group at a time and yield the longest training time (12 years). Using this guideline, each of the 13 parts would still take roughly a year, so our earlier estimate still looks accurate.
The sticky question left unanswered revolves around age. The game assumes that characters start at 15-years-old, mostly because putting children in likely-lethal situations isn't terribly palatable. Leaving that aside, the balance of attention span versus knowledge sponge could arguably even out training times. We're deep enough into special circumstances that I'd argue for just handwaving the age of the character.
In summary, roughly 2 years to master the basics of casting a single cleric cantrip. Naturally, you're free to declare the child a prodigy touched by whatever god the cleric worships and shorten that time to anything you like.