Thursday, April 14, 2011 at 1:07 AM.

river2Suite.utilities.limitRiverHistory

on limitRiverHistory () {
	<<Changes
		<<4/13/11; 3:39:02 AM by DW
			<<Keep the river size manageable.
	local (adrdata = river2suite.init (), adrcal = @adrdata^.river);
	local (when = clock.now () - (adrdata^.prefs.ctDaysInRiver * 24 * 60 * 60));
	on visit (adrday) {
		local (d = mainResponder.calendar.getAddressDay (adrday));
		if d < when {
			delete (adrday)};
		return (true)};
	mainresponder.calendar.visitReverseChronologic (adrcal, @visit, true);
	filemenu.savemyroot (adrcal)};
bundle { //test code
	limitRiverHistory ()}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.