In a large saucepan, bring salted water to a boil and simmer lentils on low for 20 - 30 minutes, or until tender. Drain water from lentils and set aside.
In a pan, saute the onions and garlic in oil. Add raisins, dates, and spices, except saffron. Mix well and set aside.
Cook rice as you would like. For a sure-fire way, I use my rice cooker. Rinse the rice under cold water until the water runs clear. Add to rice cooker and cover with 2 cups water. Add 1/2 teaspoon salt and a drizzle of oil. Cook. Once rice is done, transfer cooked rice to a large bowl.
In the same pot (or your rice cooker), add oil to just cover the bottom surface. Add potato slices.
Add a layer of rice.
Add a layer of lentil-raisin mixture.
Continue layering, ending with a final layer of rice.
Cover and cook (on medium heat in a pot or just hit "cook" button on your rice cooker) for 10 minutes.
Drizzle melted butter and saffron water over your rice.
Cover the top of your pot or rice cooker with a tea towel to prevent steam from escaping, and top with lid.
Cook on low for 30 minutes. You want to make the potatoes crispy, so they must cook slowly. In the rice cooker, I continuously hit the cook button so this process (called tadig) can happen. It's totally worth it!