/SingeltonController.cls Secret
Last active
November 23, 2020 16:56
Controller class that calls the Singleton class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public with sharing class SingeltonController { | |
@AuraEnabled | |
public static void printDateTime() { | |
DateTimeProvider dateProvider = DateTimeProvider.getInstance(); | |
System.debug('Hey, is it a leap year?'); | |
Boolean isLeapYear = Date.isLeapYear(dateProvider.now().year()); | |
if (isLeapYear) { | |
System.debug('Yep! Get testing!'); | |
} else { | |
System.debug('All clear. Enjoy your free time :) '); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment