+ Start a Discussion
Doug ACFDoug ACF 

DaysInMonth / IsLeapYear Not Working

I'm writing a bunch of date logic and haven't been able to get the daysInMonth and isLeapYear methods to work.  When I go to save in Eclipse, I get "Method does not exist or incorrect signature". 
 
My basic code looks like:
 

Date startDate=oli.Project_Start_Date__c;

Integer startYear=startDate.year();

if (isLeapYear(startYear))

dostuff...;

Any ideas?

zchenzchen
That's static method,
try
 
if(Date.isLeapYear( startYear) )
do ....