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)
Initializes 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)
Casts .Net's
DayOfWeek to DayType . |
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()
Returns WorkingTimeCollection for this WeekDay instance.
|
int |
hashCode()
Returns a hash code for this WeekDay.
|
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)
Initializes 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 int getDayType()
Returns the type of a day.
Aspose.Tasks.DayType
.public void setDayType(int value)
value
- the type of a day Aspose.Tasks.DayType
.public boolean getDayWorking()
Determines whether the specified date or day type is working.
Read/write bool
.
public void setDayWorking(boolean value)
value
- sets the day working if true.public Date getFromDate()
Returns the beginning of an exception time.
Date
).public void setFromDate(Date value)
Sets the beginning of an exception time.
value
- the beginning of an exception time (Date
).public Date getToDate()
Returns the end of an exception time.
Date
).public void setToDate(Date value)
Sets the end of an exception time.
value
- the end of an exception time (Date
).public double getWorkingTime()
Returns the working time for a week day.
public WorkingTimeCollection getWorkingTimes()
Returns WorkingTimeCollection for this WeekDay instance.
The collection of working times that define the time worked on the weekday.
Read only WorkingTimeCollection
instance.
public static int castToDayType(int dw)
Casts .Net's DayOfWeek
to DayType
.
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 static void setDefaulWorkingTime(WeekDay day)
Sets default time periods for the specified week day.
day
- The week day to set default working day on.public 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.
Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.