开发者

How to compare web service date to calendar date in Android?

开发者 https://www.devze.com 2023-02-05 21:52 出处:网络
My web service response comes in this format: 19/2/2011. I want to compare this web service date to my own calendar date.

My web service response comes in this format: 19/2/2011. I want to compare this web service date to my own calendar date.

Is there any answer and how to highligh开发者_StackOverflow社区t that date?


final Thread t = new Thread(new Runnable() {

        @Override
        public void run() {
             parseData();
        }
    });
t.start();

Thread t1 = new Thread(new Runnable() {

        @Override
        public void run() {
            try {
                t.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            //Split strings here and check them 
        }
    });
t1.start(); 


If you have both the date in strings you can break it up into day, time , year token and then can compare the strings....this will be a easy and raw approach to do this

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号