1 | year = Month.evaluateAsYear(s2);↵ | | 1 | y = Week.evaluateAsYear(s2);↵
|
2 | if (year != null) {↵ | | 2 | if (y != null) {↵
|
3 | month = SerialDate.stringToMonthCode(s1);↵ | | 3 | w = Week.stringToWeek(s1);↵
|
4 | if (month == -1) {↵ | | 4 | if (w == -1) {↵
|
5 | throw new TimePeriodFormatException(↵ | | 5 | throw new TimePeriodFormatException(↵
|
6 | "Can't evaluate the month."↵ | | 6 | "Can't evaluate the ↵
|
7 | );↵ | | 7 | week.");↵
|
8 | }↵ | | 8 | }↵
|
9 | result = new Month(month, year);↵ | | 9 | result = new Week(w, y);↵
|
10 | }↵ | | 10 | }↵
|
11 | else {↵ | | 11 | else {↵
|
12 | throw new TimePeriodFormatException(↵ | | 12 | throw new TimePeriodFormatException(↵
|
13 | "Can't evaluate the year."↵ | | 13 | "Can't evaluate the year.");↵
|
14 | | | 14 | }
|