-
-
Save randi274/e3c65e0734d0fc694c2de60a1ea561f8 to your computer and use it in GitHub Desktop.
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