Class WeekSchedule
This class is used to represent a week schedule - what hours a day are "active" for each day, etc.
Syntax
Constructors
WeekSchedule()
This class is used to represent a week schedule - what hours a day are "active" for each day, etc.
Declaration
WeekSchedule
Methods
addTimeSpan(DateTime,TimeSpan)
Adds a time span to the schedule.
Declaration
DateTime addTimeSpan(DateTime start, TimeSpan add)
Parameters
Type | Name | Description |
---|---|---|
start | Start time for calculation |
|
TimeSpan | add | The time span to add (2 days, 1 hours, 5 minutes, 30 seconds...). |
Returns
Type | Description |
---|---|
getDifference(DateTime,DateTime)
Returns difference between two DateTime as a TimeSpan.
Declaration
TimeSpan getDifference(DateTime start, DateTime stop)
Parameters
Type | Name | Description |
---|---|---|
start | Start time for calculation |
|
stop | Stop time for calculation. |
Returns
Type | Description |
---|---|
TimeSpan |
getFriStart()
This function returns the start time (object) of "active" mode for Friday.
Declaration
Time getFriStart()
Returns
Type | Description |
---|---|
Time |
getFriStop()
This function returns the end time (object) of "active" mode for Friday.
Declaration
Time getFriStop()
Returns
Type | Description |
---|---|
Time |
getMonStart()
This function returns the start time (object) of "active" mode for Monday.
Declaration
Time getMonStart()
Returns
Type | Description |
---|---|
Time |
getMonStop()
This function returns the end time (object) of "active" mode for Monday.
Declaration
Time getMonStop()
Returns
Type | Description |
---|---|
Time |
getNonDates()
This function returns the dates that are closed, comma separated.
Declaration
String getNonDates()
Returns
Type | Description |
---|---|
String |
getSatStart()
This function returns the start time (object) of "active" mode for Saturday.
Declaration
Time getSatStart()
Returns
Type | Description |
---|---|
Time |
getSatStop()
This function returns the end time (object) of "active" mode for Saturday.
Declaration
Time getSatStop()
Returns
Type | Description |
---|---|
Time |
getSunStart()
This function returns the start time (object) of "active" mode for Sunday.
Declaration
Time getSunStart()
Returns
Type | Description |
---|---|
Time |
getSunStop()
This function returns the end time (object) of "active" mode for Sunday.
Declaration
Time getSunStop()
Returns
Type | Description |
---|---|
Time |
getThuStart()
This function returns the start time (object) of "active" mode for Thursday.
Declaration
Time getThuStart()
Returns
Type | Description |
---|---|
Time |
getThuStop()
This function returns the end time (object) of "active" mode for Thursday.
Declaration
Time getThuStop()
Returns
Type | Description |
---|---|
Time |
getTueStart()
This function returns the start time (object) of "active" mode for Tuesday.
Declaration
Time getTueStart()
Returns
Type | Description |
---|---|
Time |
getTueStop()
This function returns the end time (object) of "active" mode for Tuesday.
Declaration
Time getTueStop()
Returns
Type | Description |
---|---|
Time |
getWedStart()
This function returns the start time (object) of "active" mode for Wednesday.
Declaration
Time getWedStart()
Returns
Type | Description |
---|---|
Time |
getWedStop()
This function returns the end time (object) of "active" mode for Wednesday.
Declaration
Time getWedStop()
Returns
Type | Description |
---|---|
Time |
loadFromPriority(Integer)
load a WeekSchedule object using the given priority's week schedule. Be aware that this method will clear all settings you may have on the WeekSchedule object.
Declaration
Void loadFromPriority(Integer p_id)
Parameters
Type | Name | Description |
---|---|---|
Integer | p_id |
Returns
Type | Description |
---|---|
Void |
setFriStart(Time)
This function sets the start time (object) of "active" mode for Friday.
Declaration
Void setFriStart(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setFriStop(Time)
This function sets the end time (object) of "active" mode for Friday.
Declaration
Void setFriStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setMonStart(Time)
This function sets the start time (object) of "active" mode for Monday.
Declaration
Void setMonStart(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setMonStop(Time)
This function sets the end time (object) of "active" mode for Monday.
Declaration
Void setMonStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setNonDates(String)
This function sets the dates that are inactive.
Example date string: "1/10/2004,24/12". If the year is not specified, the date is inactive every year.Declaration
Void setNonDates(String dates)
Parameters
Type | Name | Description |
---|---|---|
String | dates | A comma separated sting of dates that are not "active". |
Returns
Type | Description |
---|---|
Void |
setSatStart(Time)
This function sets the start time (object) of "active" mode for Saturday.
Declaration
Void setSatStart(Time p_0)
Parameters
Type | Name | Description |
---|---|---|
Time | p_0 | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setSatStop(Time)
This function sets the end time (object) of "active" mode for Saturday.
Declaration
Void setSatStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setSunStart(Time)
This function sets the start time (object) of "active" mode for Sunday.
Declaration
Void setSunStart(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setSunStop(Time)
This function sets the end time (object) of "active" mode for Sunday.
Declaration
Void setSunStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setThuStart(Time)
This function sets the start time (object) of "active" mode for Thursday.
Declaration
Void setThuStart(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setThuStop(Time)
This function sets the end time (object) of "active" mode for Thursday.
Declaration
Void setThuStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setTueStart(Time)
This function sets the start time (object) of "active" mode for Tuesday.
Declaration
Void setTueStart(Time p_0)
Parameters
Type | Name | Description |
---|---|---|
Time | p_0 | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setTueStop(Time)
This function sets the end time (object) of "active" mode for Tuesday.
Declaration
Void setTueStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |
setWedStart(Time)
This function sets the start time (object) of "active" mode for Wednesday.
Declaration
Void setWedStart(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired start time. |
Returns
Type | Description |
---|---|
Void |
setWedStop(Time)
This function sets the end time (object) of "active" mode for Wednesday.
Declaration
Void setWedStop(Time t)
Parameters
Type | Name | Description |
---|---|---|
Time | t | A time object set to desired stop time. |
Returns
Type | Description |
---|---|
Void |