public class MotD
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APRIL_FOOLS_DAY
The name of the system property for overriding the date of April Fool's day.
|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static java.lang.String |
WITHHOLD_APRIL_FOOLS
The name of the system property for withholding the April Fool's Day prank.
|
static java.lang.String |
WITHHOLD_MOTD
The name of the system property for withholding the message of the day.
|
Constructor and Description |
---|
MotD()
Creates a new message-of-the-day mechanism.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isAprilFoolsDay()
Determines whether today is April Fool's Day.
|
void |
showAprilFoolsMessage()
Displays the April Fools Day message if today is April Fools Day.
|
void |
showMessage()
Displays the message of the day in a simple message dialog.
|
public static final java.lang.String ID
public static final java.lang.String WITHHOLD_MOTD
Boolean.getBoolean(String)
,
Constant Field Valuespublic static final java.lang.String WITHHOLD_APRIL_FOOLS
isAprilFoolsDay()
method returns false, regardless of the day.Boolean.getBoolean(String)
,
Constant Field Valuespublic static final java.lang.String APRIL_FOOLS_DAY
public void showMessage()
There currently is no message, so this method does nothing.
public void showAprilFoolsMessage()
isAprilFoolsDay()
public static boolean isAprilFoolsDay()
Today is April Fool's day if today is April 1 through April 4. If today is
not April Fool's day, this method returns false. If the system
property WITHHOLD_APRIL_FOOLS
is true, then today is also
not April Fools and this method returns false.
For testing or just seeking giggles, the day of April Fools Day may be
changed via the system property APRIL_FOOLS_DAY
. This method still
checks whether today is that day through that day plus three days. For
example, if the day is set to August 29, this method checks for August 29
through September 1.
Copyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona