Need to get date of last Thursday of a given month in python?
<p>Need to determine any given month's last Thursday. If given month is current month, and the last Thursday has passed, need to raise an exception. I am trying to use <code>datetime</code> module, but can't find a straightforward way of doing this.</p>

<p>Edit: seems like my question was not clear enough. The function I am looking for will return the date of the final Thursday of a given month, such that no date following the returned date in the month shall be a Thursday. The problem seems to have been effectively solved by CrackaJackDev and af3ld. Thank you for that. Also a big thanks to Bahrom for crucial edits and correction. I am new to this community, so sorry if my question was not well organized. I shall try harder next time.</p>