GitHub PullRequestReviewCommentEvent at 2014-05-30 12:11:11
Repository: 90.308
Actor: smarks
Payload: {"comment":{"url":"https://api.github.com/repos/JeffBlodgett/90.308/pulls/comments/13225930","id":13225930,"diff_hunk":"@@ -1,77 +1,96 @@\n-package com.origamisoftware.teach.effective.junit;\n-\n-import java.util.Calendar;\n-import java.util.Date;\n-import java.util.GregorianCalendar;\n-\n-/**\n- * A simple Date Range Class\n- *\n- * @author Spencer A Marks\n- */\n-public class SubscriptionPeriod {\n-\n-    private Date startDate;\n-    private Date endDate;\n-\n-    /**\n-     * Creates a  SubscriptionPeriod instance\n-     *\n-     * @param startDate\n-     * @param endDate\n-     */\n-    public SubscriptionPeriod(Date startDate, Date endDate) {\n-        this.startDate = startDate;\n-        this.endDate = endDate;\n-    }\n-\n-    /**\n-     * Returns the the start date of the subscription\n-     *\n-     * @return\n-     */\n-    public Date getStartDate() {\n-        return startDate;\n-    }\n-\n-    /**\n-     * Returns the the end date of the subscription\n-     *\n-     * @return\n-     */\n-    public Date getEndDate() {\n-        return endDate;\n-    }\n-\n-    /**\n-     * Returns the total Days in the subscription\n-     *\n-     * @return\n-     */\n-    public int getTotalDays() {\n-        long differenceInDays = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24);\n-        int diff = (int )differenceInDays;\n-        return diff;\n-    }\n-\n-    /**\n-     * Returns the total months on the subscription.\n-     *\n-     * @return\n-     */\n-    public int getTotalMonths() {\n-        Calendar stop = new GregorianCalendar();\n-        Calendar start = new GregorianCalendar();\n-        stop.setTime(endDate);\n-        start.setTime(startDate);\n-        int stopYear = stop.get(Calendar.YEAR);\n-        int startYear = start.get(Calendar.YEAR);\n-        int stopMonth = stop.get(Calendar.MONTH);\n-        int startMonth = start.get(Calendar.MONTH);\n-        return (stopYear - startYear) * 12 + (stopMonth - startMonth);\n-    }\n-\n-    /*  TODO add new functionality to the SubscriptionPeriod class here and write a test for it in the test class.\n-     *  This functionality can be as simple as you want. The goal is to give you practice writing a test and some functionality\n-     */\n-}\n+package com.origamisoftware.teach.effective.junit;\r\n+\r\n+import java.util.Calendar;\r\n+import java.util.Date;\r\n+import java.util.GregorianCalendar;\r\n+\r\n+/**\r\n+ * A simple Date Range Class\r\n+ *\r\n+ * @author Spencer A Marks, Jeffrey J. Blodgett\r\n+ */\r\n+public class SubscriptionPeriod {\r\n+\r\n+    //private final Date startDate;\r\n+    //private final Date endDate;\r\n+    private final GregorianCalendar stop;\r","path":"src/main/java/com/origamisoftware/teach/effective/junit/SubscriptionPeriod.java","position":93,"original_position":93,"commit_id":"a7302b900b3660d7386fafa5a90846957b43a63c","original_commit_id":"a7302b900b3660d7386fafa5a90846957b43a63c","user":{"login":"smarks","id":493423,"avatar_url":"https://avatars.githubusercontent.com/u/493423?","gravatar_id":"8743df1f3b170210bb93548707be8693","url":"https://api.github.com/users/smarks","html_url":"https://github.com/smarks","followers_url":"https://api.github.com/users/smarks/followers","following_url":"https://api.github.com/users/smarks/following{/other_user}","gists_url":"https://api.github.com/users/smarks/gists{/gist_id}","starred_url":"https://api.github.com/users/smarks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarks/subscriptions","organizations_url":"https://api.github.com/users/smarks/orgs","repos_url":"https://api.github.com/users/smarks/repos","events_url":"https://api.github.com/users/smarks/events{/privacy}","received_events_url":"https://api.github.com/users/smarks/received_events","type":"User","site_admin":false},"body":"don't leave commented out code in the final version. ","created_at":"2014-05-30T12:11:11Z","updated_at":"2014-05-30T12:11:11Z","html_url":"https://github.com/JeffBlodgett/90.308/pull/1#discussion_r13225930","pull_request_url":"https://api.github.com/repos/JeffBlodgett/90.308/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/JeffBlodgett/90.308/pulls/comments/13225930"},"html":{"href":"https://github.com/JeffBlodgett/90.308/pull/1#discussion_r13225930"},"pull_request":{"href":"https://api.github.com/repos/JeffBlodgett/90.308/pulls/1"}}}}