We told Moses to stay with Us for thirty nights ( in the mountains ) but added ten nights more so his appointment with his Lord came to an end after forty nights . Moses had appointed his brother Aaron as his deputy among his people during his absence saying , " Try to reform them and do not follow the way of the evil-doers . "