Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.util.Calendar;
//Discounter tells whether discount is applicable or not.
public class Discounter {
public boolean isDiscountApplicable() {
Calendar calendar = Calendar.getInstance();
return calendar.get(Calendar.DAY_OF_WEEK) == 1
&& calendar.get(Calendar.MONTH) != 11;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment