These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

getDate to determine past 5th day of month

woodwardian
Registered: May 25 2009
Posts: 8

Livecycle Javascript

Non-profit housing company with a situation where if someone exits after the 5th day of the month we collect the full rent from the subsidy (SubsidyDD field name) (Section 8 or a program called Shelter Plus Care) for the entire month. The end user will enter the move-out date (ExitDate) and the type of subsidy (we have about 10) and I need the form to check that date to see if it is >= 5 and that the subsidy is one of the two above. If these conditions are met then the field should equal the last day of the month, if not the field should be the actual ExitDate.
getDate does not seem to give me anything and I'm sure I am using it wrong.

Basic outline for the issue is this-

if ( (ExitDate.getDate() >= 5) && (( SubsidyDD == "Section 8") || (SubsidyDD == "Shelter Plus Care SRA"))); {
ExitDate.getMonth() + ('-') +
{if ((ExitDate.getMonth() == 0) || (ExitDate.getMonth() == 2) || (ExitDate.getMonth() == 4) || (ExitDate.getMonth() == 6) || (ExitDate.getMonth() == 7) || (ExitDate.getMonth() == 9) || (ExitDate.getMonth() == 11) ); {
31 } else if { ( (ExitDate.getMonth() == 3) || (ExitDate.getMonth() == 5) || (ExitDate.getMonth() == 8) || (ExitDate.getMonth() == 10) )}; {
30 } else { 28 }} + ('-') +
ExitDate.getYear();
} else {
ExitDate; }

any help or advice greatly appreciated

My Product Information:
LiveCycle Designer, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Duplicate post.

Being answered [url=http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=49108#p49108]getDate for a user entered date[/url].

George Kaiser