Download Blaze Trial
Follow FICO
LinkedIn   Twitter   Youtube
Close To access this section, please choose the Community Neighborhood in which you have the most interest.

» Business Rules Management
» Collections & Recovery
» Fraud Management
» Risk Management
» Scoring
Close To access this section, please choose the Community Neighborhood in which you have the most interest.

» Business Rules Management
» Collections & Recovery
» Fraud Management
» Risk Management
» Scoring
Reply
Valued Contributor
Posts: 114
Registered: ‎10-06-2008
Accepted Solution

simple date question

I have the issue where a date of 22/04/2008 is sent into the rules (or created in blaze) and gets translated to 10/04/09. I'm not having any luck with setting calendar().lenient to false. How are others validating their dates other than using regular expressions?
DM-Forums Moderator
Posts: 472
Registered: ‎10-02-2008

Re: simple date question

I would guess that the default date format on your system is MM/dd/yyyy. The date/calendar automatically roll over when too large values are used, so that your input valule (22/04/2008) is interpreted as the tenth month after december, 2008, or 10/04/2009.

 

You can set your own default date and time format strings on NdCalendar instances. See the properties "defaultDateFormat", "defaultTimeFormat" etc.

 

Regards,

 

Jostein

Valued Contributor
Posts: 114
Registered: ‎10-06-2008

Re: simple date question

Yes, I understand what you're saying. However I would like to keep the format MM/dd/yyyy and have it not automatically roll over, this way I could validate it and return an error to the user indicating an invalid date. I thought using the calendar().lenient as false would prevent this, But the date was still automatically rolling over.

 

Is there a way to stop the roll over?

 

As I've said, I also I've tried setting calendar().lenient to false. Am I missing another step?

 

Thanks for the help.

Visitor
Posts: 2
Registered: ‎04-05-2009

Re: simple date question

I had the same problem but now its all good. thanks

Valued Contributor
Posts: 114
Registered: ‎10-06-2008

Re: simple date question

Jostein, again thanks for the comment. After taking another look I got it going,

simple over sight as usual.