public final class DayOfWeekHelper extends Object
Modifier and Type | Method and Description |
---|---|
static int |
toInt(String dayOfWeek)
Converts the day of the week from a string to an integer.
|
static String |
toString(int dayOfWeek)
Converts the day of the week from an integer to a string.
|
public static int toInt(String dayOfWeek) throws InvalidValueException
dayOfWeek
- the day of week as a string: "Sunday", "Monday", etc.InvalidValueException
- when the input value is invalidpublic static String toString(int dayOfWeek) throws InvalidValueException
dayOfWeek
- the day of week as an integer: 1 is Sunday, 2 is Monday, etc.InvalidValueException
- when the input value is out of rangeCopyright © 2003, 2020, Oracle and/or its affiliates.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.