You need to sign in to do that
Don't have an account?
David_
Data class method: Quick question regarding isLeapYear
Hey there,
I have a quick question regarding the usage of isLeapYear for a Date.
Does isLeapYear always require a parameter within the brackets? This code apparently works...
Thanks for your help!
I have a quick question regarding the usage of isLeapYear for a Date.
Does isLeapYear always require a parameter within the brackets? This code apparently works...
Date myDate = Date.newInstance(2041, 11, 19); Boolean dateIsLeapYear = Date.isLeapYear(myDate.year()); System.debug(dateIsLeapYear);... but what about next one? I guess it's not possible to place first the variable and leave the brackets empty:
Date myDate = Date.newInstance(2041, 11, 19); Boolean dateIsLeapYear = myDate.isLeapYear(); System.debug(dateIsLeapYear);Just wanna make sure.
Thanks for your help!
Refer to this for the Date class:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_date.htm