Application of Islamic law by country punished by imprisonment of up to six months. It has a civil law system. The Family Code is mainly derived from Islamic law and regulates personal status matters such as marriage, divorce, child custody and inheritance. Sharia does not apply to criminal law. Article 2 of Egypt's 2014 Constitution declares the principles of Islamic sharia to be the main source of legislation. Egypt's law and enforcement system are in flux since its 2011 Revolution; however, the declaration of Sharia's primacy in Article 2 is a potential ground for unconstitutionality of any secular laws in Egyptian legal code. Sharia courts and
Islamic criminal law in Aceh and distribution, gambling, adultery, rape, sexual harassment, certain intimacies outside marriage, and certain homosexual acts. Punishments include caning, fines, and imprisonment. Caning is the only Sharia-based punishment that applied in Aceh; an attempt to introduce stoning in 2009 by local legislature was vetoed by Governor of Aceh Irwandi Yusuf. In 2016 Aceh processed 324 first instance court cases under Islamic criminal law, and carried out at least 100 caning sentences. Supporters of Islamic criminal law defend its legality under the special autonomy granted to Aceh, saying that it is covered by the freedom of religion of the people of Aceh.