package com.box.sdk;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public final class BoxDateFormat {
    private static final ThreadLocal<DateFormat> THREAD_LOCAL_DATE_FORMAT = new ThreadLocal<DateFormat>() {
        @Override
        protected DateFormat initialValue() {
            return new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX");
        }
    };

    private BoxDateFormat() { }

    public static Date parse(String dateString) throws ParseException {
        return THREAD_LOCAL_DATE_FORMAT.get().parse(dateString);
    }

    public static String format(Date date) {
        return THREAD_LOCAL_DATE_FORMAT.get().format(date);
    }
}

@@ -136,16 +136,103 @@
 .Date;%0A%0A
+/**%0A * Contains methods for parsing and formatting dates for use with the Box API.%0A */%0A
 public f
@@ -556,147 +556,613 @@
     
-public static Date parse(String dateString) throws ParseException %7B%0A        return THREAD_LOCAL_DATE_FORMAT.get().parse(dateString);%0A    %7D%0A
+/**%0A     * Parses a date string returned by the Box API into a %7B@link Date%7D object.%0A     * @param  dateString     a string containing the date.%0A     * @return                the parsed date.%0A     * @throws ParseException if the string cannot be parsed into a valid date.%0A     */%0A    public static Date parse(String dateString) throws ParseException %7B%0A        return THREAD_LOCAL_DATE_FORMAT.get().parse(dateString);%0A    %7D%0A%0A    /**%0A     * Formats a date as a string that can be sent to the Box API.%0A     * @param  date the date to format.%0A     * @return      a string containing the formatted date.%0A     */
 %0A   

Add javadocs to BoxDateFormat