0
我正在使用它来读取HTML项目列表。如何将字符串与日历日期进行比较?
while (postIt.hasNext()) {
Element name = postIt.next();
nameOf = name.text();
String platform = postIt.next().text();
//Get the URL
Element url = name.select("a").first();
urlString = url.attr("href");
//Get the Genre of the item
String genre = postIt.next().text();
//Get the date
Date = postIt.next().text();
}
我想要做的是将日期字符串与Android设备上当前日期的日期字符串进行比较? 我将如何去通过日历做这件事?
好的很酷的声音就像我需要的!那么我会在哪里比较我的日期,我从我的HTML到你上面描述的日期? – yoshi24
这是你需要的地方。我上面发布的代码几乎可以放在任何地方! –
明白了!好的,还有一件事......是否可以将格式设置为2011年8月26日?我没有在文档中看到它。 – yoshi24