The court heard the men were searched and 19-year-old Rance was found to have seven bags of cannabis in a rucksack along with a small quantity of cocaine. Kerrison had two bags of herbal cannabis and a mobile phone.
The defendants' houses were searched and in Rance's bedroom officers found two large bags of cannabis worth more than £1,200.
The court heard Kerrison's phone contained numerous messages related to drug dealing and on the day in question he had sent a message to 18 contacts saying: "Mad flavours from 10 tonight - let me know for more details."
Mr Scapens said it was the prosecution's case that the defendants had been in the library car park that night for Rance to supply the cannabis he had bought in bulk to Kerrison for onward sale to customers he knew.
Kerrison, from Southgate, Gower, admitted possession of cannabis with intent to supply and being concerned in the supply of cannabis while Rance, also from Southgate, admitted possession of cannabis with intent and simple possession of cocaine. The court heard neither has any previous convictions.
Matt Henson, for Kerrison, said his client had a realistic prospect of securing work after completing a course in construction.
James McKenna, for Rance, said his client was due to start a degree course later in the year. The court heard Rance is involved in the performing arts.
Judge Hale told the defendants that at first "cannabis may be an experiment that you find pleasurable" but its use can have serious consequences.
He said courts all too often see lives that have been "desperately affected" by the use of strong cannabis.
The judge said the delay in bringing the case to court "does not do the system much credit" and had meant a long period of stress and worry for the defendants' families.
However, he said the delay may have worked to the benefit of the pair as it meant they were able to demonstrate they had got their lives back on track and had stayed out of trouble.
He said Rance seemed to have got involved with "ne'er-do-wells in Liverpool" by his cannabis-buying activities while Kerrison had set himself up as dealer for people in the local community.
Judge Hale said he did not want to fetter the prospects of the young men with custodial sentences and imposed on each a 12-month community order with 100 hours of unpaid work. In addition Kerrison will have to complete a rehabilitation programme.
Releasing them from the dock he told them: "I hope a court never sees either of you again."