Date today = Date.today(); // Gets today's date Integer currentMonth = today.month(); // Extracts the current month System.debug('Current Month: ' + currentMonth); // Displays the current month
Standard input is empty
Object: Date error: did not understand #associationAt:ifAbsent: MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254) Date class(Object)>>doesNotUnderstand: #associationAt:ifAbsent: (SysExcept.st:1448) DeferredVariableBinding>>resolvePathFrom: (DeferBinding.st:115) DeferredVariableBinding>>value (DeferBinding.st:69) UndefinedObject>>executeStatements (prog:1)
./prog:1: expected expression ./prog:4: Unterminated string, attempting recovery