aspose file tools*
The moose likes Java in General and the fly likes date validations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "date validations" Watch "date validations" New topic
Author

date validations

Devapatla Ramagopal Reddy
Greenhorn

Joined: Aug 14, 2001
Posts: 5
Hi,
In my application the user selects the ToDate and FromDate fromcombobox.I can able to capture those values as inters in my java program,now i would like to do some validations:
1.ToDate should be less than or equal to CurrentDate.
2.ToDate should be greater than or equal to FromDate.
3.Date Range is limited to 45 days only(parameterized).
I need to develop business rule for the aboue validation.can u give some idea...Thanks.
Ram.
Amit Agrawal
Ranch Hand

Joined: Aug 23, 2001
Posts: 282
Hi
can you please let me know what is your user interface ? is it html (may be genrated by jsp) or AWT/Swing ?
In case its HTML this would be better to do in javascript or if it is AWT there are methods like before() and after() in Date class..you may use them.
Devapatla Ramagopal Reddy
Greenhorn

Joined: Aug 14, 2001
Posts: 5
Hi Amit,
thax a lot fo rur reply..
My user interface is HTML(generated by jsp), but the client wants to develop it as business object, anyway i just completed the application.
once again thanx a lot..
Ram.
Roger Wang
Greenhorn

Joined: Sep 13, 2001
Posts: 6
for html(jsp) or java UI I know the solution...
but sorry I don't know what is business object,
and how to finished your task as 'business object'?
anyone drop me a line?
thax
BR
Devapatla Ramagopal Reddy
Greenhorn

Joined: Aug 14, 2001
Posts: 5
Hi wang,
thanx for ur reply..
Business object in the sense, we developed these as a EJB component.
Rgds,
ram.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: date validations
 
Similar Threads
How to get the Dates in-between two Dates
date validation in java
PartialTrigger with two inputDate does not work properly...
Compare two custom date input fields each having 3 inputText fields using validator
how to convert a string to date