Defining Weekdays for Exceptions in Ruby

Aspose.Tasks - Defining Weekdays for Exceptions

To Define Weekdays for Exceptions using Aspose.Tasks Java for Ruby, simply invoke DefineWeekdaysForExceptions module. Here you can see example code.

 1project = Rjb::import('com.aspose.tasks.Project').new('test_tasks.mpp')
 2
 3cal = project.getCalendars().add("Calendar1")
 4
 5except = Rjb::import('com.aspose.tasks.CalendarException').new
 6
 7except.setEnteredByOccurrences(false)
 8
 9cal_object = Rjb::import('java.util.Calendar').getInstance()
10
11cal_object.set(2009, 12, 24, 0, 0, 0)
12
13except.setFromDate(cal_object.getTime())
14
15cal_object.set(2009, 12, 31, 23, 59, 0)
16
17except.setToDate(cal_object.getTime())
18
19except.setType(Rjb::import('com.aspose.tasks.CalendarExceptionType').Daily)
20
21except.setDayWorking(false)
22
23cal.getExceptions().add(except)
24
25puts "Defined weekdays for exceptions."

Download Running Code

Download Defining Weekdays for Exceptions (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.