// Path: app/src/main/java/io/bxbxbai/zhuanlan/core/ZhuanLanApi.java
// public final class ZhuanLanApi {
// 
//     public static final int DEFAULT_COUNT = 10;
// 
//     public static final String KEY_POSTS = "/posts";
//     public static final String KEY_LIMIT = "limit";
//     public static final String KEY_OFFSET = "offset";
//     public static final String KEY_RATING = "rating";
// 
//     public static final String ZHUAN_LAN_URL = "https://zhuanlan.zhihu.com";
//     public static final String API_BASE = ZHUAN_LAN_URL + "/api/columns/%s";
// 
//     /**
//      * slug, post id
//      */
//     public static final String API_POST_DETAIL = ZHUAN_LAN_URL + "/api/columns/%s/posts/%s";
// 
// 
//     public static final class Url {
//         private Url() {}
// 
//         public static final String ZHIHU_DAILY_BEFORE = "http://news.at.zhihu.com/api/3/news/before/";
//         public static final String ZHIHU_DAILY_OFFLINE_NEWS = "http://news-at.zhihu.com/api/3/news/";
//         public static final String ZHIHU_DAILY_PURIFY_HEROKU_BEFORE = "http://zhihu-daily-purify.herokuapp.com/raw/";
//         public static final String ZHIHU_DAILY_PURIFY_SAE_BEFORE = "http://zhihudailypurify.sinaapp.com/raw/";
//         public static final String SEARCH = "http://zhihudailypurify.sinaapp.com/search/";
//     }
// 
//     /**
//      * 知乎日报启动画面api（手机分辨率的长和宽）
//      */
//     public static final String API_START_IMAGE = "http://news-at.zhihu.com/api/4/start-image/%d*%d";
//     public static final String API_RATING = API_BASE + KEY_POSTS + "{post_id}" + KEY_RATING;
//     public static final String API_POST_LIST = API_BASE + KEY_POSTS;
// 
//     public static final String PIC_SIZE_XL = "xl";
//     public static final String PIC_SIZE_XS = "xs";
// 
// 
//     public static final String TEMPLATE_ID = "{id}";
//     public static final String TEMPLATE_SIZE = "{size}";
// 
// 
//     private static ZhuanLanApi instance = new ZhuanLanApi();
// 
//     private Retrofit retrofit;
// 
//     private ZhuanLanApi() {
//         retrofit = new Retrofit.Builder()
//                 .baseUrl(ZHUAN_LAN_URL)
//                 .addConverterFactory(GsonConverterFactory.create())
// //                .client(createHttpClient())
//                 .build();
//     }
// 
//     public static <T> T api(Class<T> clazz) {
//         return instance.retrofit.create(clazz);
//     }
// 
//     public static Api getZhuanlanApi() {
//         return api(Api.class);
//     }
// 
//     private static OkHttpClient createHttpClient(Context context) {
//         OkHttpClient.Builder builder = new OkHttpClient.Builder();
//         builder.cache(new Cache(context.getCacheDir(), 10 * 1024*1024));
//         return builder.build();
//     }
// }


import android.text.TextUtils;
import io.bxbxbai.zhuanlan.core.ZhuanLanApi;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return false;
    }

    public static int compareTime(String a, String b) {
        try {
            long timeA = TimeUnit.MILLISECONDS.toSeconds(
                    new Date().getTime() - FORMAT.parse(a).getTime());
            long timeB = TimeUnit.MILLISECONDS.toSeconds(
                    new Date().getTime() - FORMAT.parse(b).getTime());

            return timeA >= timeB ? 1 : -1;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return 0;
    }

    public static String removeHtmlCode(String source) {
        if (TextUtils.isEmpty(source)) {
            return source;
        }

        StringBuilder dest = new StringBuilder();
        for (int i = 0, flag = 0; i < source.length(); i++) {
            char c  = source.charAt(i);

            if (c == '<') {
// Path: app/src/main/java/io/bxbxbai/zhuanlan/core/ZhuanLanApi.java
// public final class ZhuanLanApi {
// 
//     public static final int DEFAULT_COUNT = 10;
// 
//     public static final String KEY_POSTS = "/posts";
//     public static final String KEY_LIMIT = "limit";
//     public static final String KEY_OFFSET = "offset";
//     public static final String KEY_RATING = "rating";
// 
//     public static final String ZHUAN_LAN_URL = "https://zhuanlan.zhihu.com";
//     public static final String API_BASE = ZHUAN_LAN_URL + "/api/columns/%s";
// 
//     /**
//      * slug, post id
//      */
//     public static final String API_POST_DETAIL = ZHUAN_LAN_URL + "/api/columns/%s/posts/%s";
// 
// 
//     public static final class Url {
//         private Url() {}
// 
//         public static final String ZHIHU_DAILY_BEFORE = "http://news.at.zhihu.com/api/3/news/before/";
//         public static final String ZHIHU_DAILY_OFFLINE_NEWS = "http://news-at.zhihu.com/api/3/news/";
//         public static final String ZHIHU_DAILY_PURIFY_HEROKU_BEFORE = "http://zhihu-daily-purify.herokuapp.com/raw/";
//         public static final String ZHIHU_DAILY_PURIFY_SAE_BEFORE = "http://zhihudailypurify.sinaapp.com/raw/";
//         public static final String SEARCH = "http://zhihudailypurify.sinaapp.com/search/";
//     }
// 
//     /**
//      * 知乎日报启动画面api（手机分辨率的长和宽）
//      */
//     public static final String API_START_IMAGE = "http://news-at.zhihu.com/api/4/start-image/%d*%d";
//     public static final String API_RATING = API_BASE + KEY_POSTS + "{post_id}" + KEY_RATING;
//     public static final String API_POST_LIST = API_BASE + KEY_POSTS;
// 
//     public static final String PIC_SIZE_XL = "xl";
//     public static final String PIC_SIZE_XS = "xs";
// 
// 
//     public static final String TEMPLATE_ID = "{id}";
//     public static final String TEMPLATE_SIZE = "{size}";
// 
// 
//     private static ZhuanLanApi instance = new ZhuanLanApi();
// 
//     private Retrofit retrofit;
// 
//     private ZhuanLanApi() {
//         retrofit = new Retrofit.Builder()
//                 .baseUrl(ZHUAN_LAN_URL)
//                 .addConverterFactory(GsonConverterFactory.create())
// //                .client(createHttpClient())
//                 .build();
//     }
// 
//     public static <T> T api(Class<T> clazz) {
//         return instance.retrofit.create(clazz);
//     }
// 
//     public static Api getZhuanlanApi() {
//         return api(Api.class);
//     }
// 
//     private static OkHttpClient createHttpClient(Context context) {
//         OkHttpClient.Builder builder = new OkHttpClient.Builder();
//         builder.cache(new Cache(context.getCacheDir(), 10 * 1024*1024));
//         return builder.build();
//     }
// }


// Path: app/src/main/java/io/bxbxbai/zhuanlan/utils/Utils.java
import android.text.TextUtils;
import io.bxbxbai.zhuanlan.core.ZhuanLanApi;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;

        } catch (ParseException e) {
            e.printStackTrace();
        }
        return false;
    }

    public static int compareTime(String a, String b) {
        try {
            long timeA = TimeUnit.MILLISECONDS.toSeconds(
                    new Date().getTime() - FORMAT.parse(a).getTime());
            long timeB = TimeUnit.MILLISECONDS.toSeconds(
                    new Date().getTime() - FORMAT.parse(b).getTime());

            return timeA >= timeB ? 1 : -1;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return 0;
    }

    public static String removeHtmlCode(String source) {
        if (TextUtils.isEmpty(source)) {
            return source;
        }

        StringBuilder dest = new StringBuilder();
        for (int i = 0, flag = 0; i < source.length(); i++) {
            char c  = source.charAt(i);

            if (c == '<') {
                flag = 1;