Package com.primavera.integration.util
Class DayOfWeekHelper
java.lang.Object
com.primavera.integration.util.DayOfWeekHelper
Helper to convert the day of the week value between integer and string types.
Sunday is considered the first day of the week, with an index of 1.
-
Method Summary
-
Method Details
-
toInt
Converts the day of the week from a string to an integer. Sunday has an index of 1.- Parameters:
dayOfWeek- the day of week as a string: "Sunday", "Monday", etc.- Returns:
- int the integer value of the day of the week
- Throws:
InvalidValueException- when the input value is invalid
-
toString
Converts the day of the week from an integer to a string.- Parameters:
dayOfWeek- the day of week as an integer: 1 is Sunday, 2 is Monday, etc.- Returns:
- String the string value of the day of the week
- Throws:
InvalidValueException- when the input value is out of range
-