Skip to content

Instantly share code, notes, and snippets.

@Mulugruntz
Created June 19, 2018 09:23
Show Gist options
  • Save Mulugruntz/50eeb1ab605f9d2dfdb542da7aa85395 to your computer and use it in GitHub Desktop.
Save Mulugruntz/50eeb1ab605f9d2dfdb542da7aa85395 to your computer and use it in GitHub Desktop.
Get the day of the week in Jenkins pipeline / Groovy
import java.text.SimpleDateFormat
import java.util.Date
def day = new SimpleDateFormat('EEEE').format(new Date())
println day // Tuesday (for example)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment