How to get day from date in frappe?

Like 2017-12-27
return Wednesday

https://stackoverflow.com/questions/9847213/how-do-i-get-the-day-of-week-given-a-date-in-python

edit: further pointers
How to get today date
How to get today date