Skip to content

Instantly share code, notes, and snippets.

@bjpeterdelacruz
Created February 18, 2014 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjpeterdelacruz/9064630 to your computer and use it in GitHub Desktop.
Save bjpeterdelacruz/9064630 to your computer and use it in GitHub Desktop.
Setting a date.
public void setDate(Date date) {
if (date == null) {
throw new IllegalArgumentException("date is null");
}
this.date = new Date(date.getTime());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment