Skip to content

Commit

Permalink
fixed #18
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchharvey committed Mar 21, 2018
1 parent f641e50 commit 772226d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/com/mygcc/datacollection/ClassData.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ public abstract class ClassData extends MyGCCDataCollection {
public static final String MAGIC_URL_NUMBER = "30";

/**
* Current Year, not sure how this changes so for now it is a variable.
* Current Year.
*/
public static final String CURRENT_YEAR = "2017";
public static final String CURRENT_YEAR = "2018";

This comment has been minimized.

Copy link
@davidcorbin

davidcorbin Mar 21, 2018

Owner

We could also get the current date dynamically so that this wouldn't be an issue again. e.g. Calendar.getInstance().get(Calendar.YEAR);


/**
* Current Year (according to MyGCC).
*/
public static final String MYGCC_YEAR = "2017";

/**
* The expected number of course code sections.
Expand Down Expand Up @@ -118,11 +123,11 @@ public final String courseCodeToURL(final String courseCode)
url.append(String.format("/%s/%s_%s", subject, subject, number));
if (section.length() > 1) {
url.append(String.format("/%s_%s-%s_%s-%s____L/",
CURRENT_YEAR, MAGIC_URL_NUMBER, subject,
MYGCC_YEAR, MAGIC_URL_NUMBER, subject,
number, section.charAt(0)));
} else {
url.append(String.format("/%s_%s-%s_%s-%s/",
CURRENT_YEAR, MAGIC_URL_NUMBER, subject, number, section));
MYGCC_YEAR, MAGIC_URL_NUMBER, subject, number, section));
}
return url.toString();
}
Expand Down

0 comments on commit 772226d

Please sign in to comment.