aspose file tools*
The moose likes JSP and the fly likes JSTL Date Range Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL Date Range Question" Watch "JSTL Date Range Question" New topic
Author

JSTL Date Range Question

Harry Bungle
Greenhorn

Joined: Nov 09, 2005
Posts: 2
I am using JSTL to parse an xml feed (news articles) and need to restrict the articles I get back in the xml to todays date. On another page I am working on I have to restrict the articles to todays date - 7 days (one week). The date I have to restrict on in the xml feed is called <pubDate>. If anyone could help me out with using JSTL to parse and handle these date ranges that would be great. Here is a portion of the xml I am dealing with:

- <!-- Item 1 of todays_free_feature
-->
- <item>
<title>Building an Online Library</title>
<link>http://online.wsj.com/public/article/0,,SB113111987803688478-VNpw62xi_JA4avE8cxOZf0pf_nM_20061109,00.html?mod=rss_free</link>
<description>Liz Ridolfo is one of several foot soldiers engaged in an ambitious effort to digitize the world's libraries, one volume at a time.</description>
<pubDate>Tue, 08 Nov 2005 20:22:00 EST</pubDate>
</item>
- <!-- Item 2 of todays_free_feature
-->
- <item>
<title>Guest-Worker Proposals Prove Divisive</title>
<link>http://online.wsj.com/public/article/0,,SB113149831207391770-V6OGF4bCCsOhJlj0ZAPd1jKIMUg_20061109,00.html?mod=rss_free</link>
<description>Bush is proposing a guest worker program that business loves and the Senate seems eager to pass, but the issue splits Republicans eager to help business from those concerned about border security, job losses and the nation's identity.</description>
<pubDate>Tue, 08 Nov 2005 23:02:00 EST</pubDate>
</item>
- <!-- Item 3 of todays_free_feature
-->
- <item>
<title>Changing Times at the Fed</title>
<link>http://online.wsj.com/public/article/0,,SB113136589127989951-biMkDwuEVMUvrmqav2YE8OCApTk_20061109,00.html?mod=rss_free</link>
<description>Alan Greenspan will soon step down as Federal Reserve chairman and hand the reins to Ben Bernanke. But that's not the only change likely to be in store at the U.S. central bank. William Polley and Tim Duy to explore what the future might hold for the seat of U.S. monetary policy.</description>
<pubDate>Tue, 08 Nov 2005 20:46:00 EST</pubDate>
</item>
- <!-- Item 4 of todays_free_feature
-->
- <item>
<title>Protecting Ideas Is Crucial for U.S. Business</title>
<link>http://online.wsj.com/public/article/0,,SB113149228287891613-mKwE4jbbsNWEvRsGvadhQNc6tGI_20061109,00.html?mod=rss_free</link>
<description>Intellectual property is one of the thorniest problems facing modern capitalism. The challenge is to protect creators' right to profit while still ensuring that the benefits of their creations are widely spread.</description>
<pubDate>Tue, 08 Nov 2005 22:50:00 EST</pubDate>
</item>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61762
    
  67

"Schezwan Chkn",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Harry Bungle
Greenhorn

Joined: Nov 09, 2005
Posts: 2
This is just a nickname. My real name is very similar and my friends gave me that nickname. Do you want me to make up some fictitious name with a more American appeal? Kind of funny how the only advice this forum has to offer so far is on screen names and not the issue at hand.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61762
    
  67

Sorry, but the naming rules are quite clear. These forums have a lot to offer and one of the only big rules (other than 'be nice') is to use your real name or one that we can't tell is not your real name. Nicknames or an intial are fine for a first name, but you should use your real last name.

Any further discussion of the naming policy should take place here.

Be aware that accounts with invalid display names are subject to removal.

bear
Forum bartender
[ November 10, 2005: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL Date Range Question