...
Code Block | ||||
---|---|---|---|---|
| ||||
import java.util.Date;
import java.text.DateFormat;
import java.util.Locale;
// ...
public static void isJune(Date date) {
String myString = DateFormat.getDateInstance().format(date);
System.out.println("The date is " + myString);
if (myString.startsWith("Jun ")) {
System.out.println("Enjoy June!");
} else {
System.out.println("It's not June.");
}
}
|
...
[API 2006] | Class |
[Schindler] | Schindler, Uwe. The Policeman’s Horror: Default Locales, Default Charsets, and Default Timezones, The Generics Policeman Blog |
...
STR01-J. Don't form strings containing partial characters Rule 00: Input Validation and Data Sanitization (IDS)