public class WeekDay extends Object
Represents a weekday which either defines regular days of a week or exception days in a calendar.
Constructor and Description |
---|
WeekDay()
Initializes a new instance of the
WeekDay class. |
WeekDay(int dayType)
Initializes a new instance of the
WeekDay class with the specified day type. |
WeekDay(int dayType,
List<WorkingTime> workingTimes)
IInitializes a new instance of the
WeekDay class with the specified day type and list of working time periods. |
Modifier and Type | Method and Description |
---|---|
static int |
castToDayType(int dw)
|
static WeekDay |
createDefaultWorkingDay(int dayType)
Creates default working day.
|
WeekDay |
deepClone()
Implementation of IClonable interface, returns a deep copy of the week day.
|
boolean |
equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.
|
int |
getDayType()
Returns the type of a day.
|
boolean |
getDayWorking()
Determines whether the specified date or day type is working.
|
Date |
getFromDate()
Returns the beginning of an exception time.
|
Date |
getToDate()
Returns the end of an exception time.
|
double |
getWorkingTime()
Returns the working time for a week day.
|
WorkingTimeCollection |
getWorkingTimes()
Gets WorkingTimeCollection for this WeekDay instance.
|
int |
hashCode()
Returns a hash code value for the instance of the
WeekDay class. |
void |
setDayType(int value)
Sets the type of a day.
|
void |
setDayWorking(boolean value)
Determines whether the specified date or day type is working.
|
static void |
setDefaulWorkingTime(WeekDay day)
Sets default time periods for the specified week day.
|
void |
setFromDate(Date value)
Sets the beginning of an exception time.
|
void |
setToDate(Date value)
Sets the end of an exception time.
|
public WeekDay(int dayType)
Initializes a new instance of the WeekDay
class with the specified day type.
dayType
- The specified day type.public WeekDay(int dayType, List<WorkingTime> workingTimes)
IInitializes a new instance of the WeekDay
class with the specified day type and list of working time periods.
dayType
- The specified day type.workingTimes
- List of working time periods.public WeekDay()
Initializes a new instance of the WeekDay
class.
public static int castToDayType(int dw)
Casts .Net's DayOfWeek
to DayType
(getDayType()
/setDayType(int)
).
dw
- The day of week to cast from.public static WeekDay createDefaultWorkingDay(int dayType)
Creates default working day.
dayType
- The day type to create default working day from.public final WeekDay deepClone()
Implementation of IClonable interface, returns a deep copy of the week day.
public boolean equals(Object obj)
Returns a value indicating whether this instance is equal to a specified object.
public final int getDayType()
Returns the type of a day.
Aspose.Tasks.DayType
.public final void setDayType(int value)
value
- the type of a day Aspose.Tasks.DayType
.public final boolean getDayWorking()
Determines whether the specified date or day type is working.
Read/write bool
.
public final void setDayWorking(boolean value)
value
- sets the day working if true.public final Date getFromDate()
Returns the beginning of an exception time.
Date
).public final void setFromDate(Date value)
Sets the beginning of an exception time.
value
- the beginning of an exception time (Date
).public final Date getToDate()
Returns the end of an exception time.
Date
).public final void setToDate(Date value)
Sets the end of an exception time.
value
- the end of an exception time (Date
).public final double getWorkingTime()
Returns the working time for a week day.
public final WorkingTimeCollection getWorkingTimes()
Gets WorkingTimeCollection for this WeekDay instance.
The collection of working times that define the time worked on the weekday.
Read only WorkingTimeCollection
instance.
public int hashCode()
Returns a hash code value for the instance of the WeekDay
class.
public static void setDefaulWorkingTime(WeekDay day)
Sets default time periods for the specified week day.
day
- The week day to set default working day on.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.