Code example for Calendar

Methods: after, before, equals, get

0
			this.finish = dateStringToCalendar(fin);
		} 
		 
		public boolean servesDay(Calendar c) {
			int shift = 0;
			int dow = c.get(Calendar.DAY_OF_WEEK);
			if ( dow == Calendar.SUNDAY ) {
				shift = 6;
			} else { 
				shift = dow - 1;
			} 
 
			return (this.days & (1 << shift)) > 0;
		} 
		 
		public boolean inService(Calendar c) {
			return servesDay(c) && (c.equals(this.start) || c.after(this.start)) && ((c.equals(this.finish) || c.before(this.finish)));
		} 
	} 
	 
	static private Schema the_instance = null;