Skip to content

Instantly share code, notes, and snippets.

@megabites2013
Created March 25, 2021 19:17
Show Gist options
  • Save megabites2013/669ca41769870714c0a81e4018f691a4 to your computer and use it in GitHub Desktop.
Save megabites2013/669ca41769870714c0a81e4018f691a4 to your computer and use it in GitHub Desktop.
def getDayName(day)
dayName = ""
case day
when "Mon"
dayName = "Monday"
when "Tue"
dayName = "Tuesday"
when "Wed"
dayName = "Wednesday"
when "Thu"
dayName = "Thursday"
when "Fri"
dayName = "Friday"
when "Sat"
dayName = "Saturday"
when "Sun"
dayName = "Sunday"
else
dayName = "Error"
end
end
puts getDayName("Mon")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment