Date firstDate = Date.newInstance(2006, 12, 2); Date secondDate = Date.newInstance(2012, 12, 8); Integer monthsBetween = firstDate.monthsBetween(secondDate);
Standard input is empty
Object: Date error: did not understand #firstDate MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254) Date class(Object)>>doesNotUnderstand: #firstDate (SysExcept.st:1448) UndefinedObject>>executeStatements (prog:1) Object: 2006 error: did not understand #, MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254) SmallInteger(Object)>>doesNotUnderstand: #, (SysExcept.st:1448) UndefinedObject>>executeStatements (prog:1)
./prog:1: expected expression