Skip to content

Instantly share code, notes, and snippets.

Last active November 23, 2020 16:56
What would you like to do?
Controller class that calls the Singleton class
public with sharing class SingeltonController {
public static void printDateTime() {
DateTimeProvider dateProvider = DateTimeProvider.getInstance();
System.debug('Hey, is it a leap year?');
Boolean isLeapYear = Date.isLeapYear(;
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