is current year a leap year? apex salesforce - Salesforce Globe For You
Solution: use isLeapYear() of Date to know if the given year is leap year or not.
Example: To check current year is leap year or not.
Run the piece of code below in anonymous window.
String year = system.today().year();
system.debug('Is current Year leap year:'+Date.isLeapYear(year));
output:
No comments:
Post a Comment