Skip to content

Instantly share code, notes, and snippets.

@Falciighol
Created January 14, 2020 22:02
Show Gist options
  • Save Falciighol/6adff3d6eaf78a97328d7f0ce21e0330 to your computer and use it in GitHub Desktop.
Save Falciighol/6adff3d6eaf78a97328d7f0ce21e0330 to your computer and use it in GitHub Desktop.
[Timer Date] Set and return the timer date in Bonita #groovy #bp #bonita
import java.time.LocalDate;
// New calendar instance
Calendar calendar = GregorianCalendar.getInstance();
LocalDate dt = LocalDate.parse("2020-01-15");
Integer day = 0, month = 0, year = 0;
year = dt.getYear();
month = dt.getMonthValue() - 1;
day = dt.getDayOfMonth();
calendar.set(year, month, day, 0, 0, 0);
calendar.getTime();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment