Thread: Age Calculation
View Single Post
  #35  
Old 05-09-2010, 08:15 AM
 
minfinger minfinger is offline
 

X-Adept
  
Join Date: Apr 2009
Posts: 678
 

Default Re: Age Calculation

Thanks Tal.

I was trying to input some logic in the final calc. His puppies are often after less than a year old, so it's not necessary to include the year calc.

I was trying the following, but it's not working right

Code:
if(dife[0]>0){ {/literal} document.getElementById('dAge').innerHTML = dife[0]+" years, "+dife[1]+" months, and "+dife[2]+" days";} if(dife[1]>0){ {/literal} document.getElementById('dAge').innerHTML = dife[1]+" months, and "+dife[2]+" days";}
__________________
X-Cart 4.3
Joomla
Among other things
Reply With Quote