Created
June 19, 2018 09:23
-
-
Save Mulugruntz/50eeb1ab605f9d2dfdb542da7aa85395 to your computer and use it in GitHub Desktop.
Get the day of the week in Jenkins pipeline / Groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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