package com.csc.library.timeattendance; import com.csc.library.utilities.CscCalendar; public class TimeZone1 extends TimeZone { private String type = null; public TimeZone1() { super.clear(); } public TimeZone1(CscCalendar st , CscCalendar en){ super.clear(); super.setBeginZone(st); super.setEndZone(en); } public boolean intersectZone( TimeZone tz ){ return this.inZone(tz.getBeginZone()) || this.inZone(tz.getEndZone()) || ( this.getBeginZone().afterEqualsDateTime( tz.getBeginZone() ) && this.getEndZone().beforeEqualsDateTime( tz.getEndZone()) ); } public boolean TimeZoneInTimeZone( TimeZone tz ){ return (this.inZone(tz.getBeginZone()) && this.inZone(tz.getEndZone())); } public void setType(String t){ this.type = t; } public String getType(){ return this.type; } public String getKey() { return this.getBeginZone().getYYYYMMDDHHMMSS(); } public float getDiffTimeZone(){ return this.getEndZone().subForHour(this.getBeginZone()); } }