Kibana scripted fields

sir instead of writing these much if statements for everyday, i want to fetch current dayOfWeek using the below code and replace it with the word "monday" present in my data and find the solution for that day alone.
def dayOfWeek = ["", "Mon", "Tue", "Wed", "Thu", "fri", "Sat", "Sunday"]
doc['@timestamp'].value.dayOfWeek;
i am sorry if i have confused you again. thanks for your time and help :blush: