Skip to content

Instantly share code, notes, and snippets.

@bdkosher
Created July 17, 2017 15:47
Show Gist options
  • Save bdkosher/3284c0e8e9968be2cac7e76176e21524 to your computer and use it in GitHub Desktop.
Save bdkosher/3284c0e8e9968be2cac7e76176e21524 to your computer and use it in GitHub Desktop.
Using Goodtimes to find the number of days until vacation begins.
@Grab('com.github.bdkosher:goodtimes:1.2')
import static bdkosher.goodtimes.LocalDates.August
import static java.time.LocalDate.now
def lakeWeek = August 12
int daysTillLakeWeek = (now() >> lakeWeek).days
println "$daysTillLakeWeek days until the Lake"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment