Sha256: 0ab45c5434d08a484236a5b3fa473e209d4061f7f43211da009c454ff27c86df
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
module Asposetasksjava module DefineWeekdaysForExceptions def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Instantiate project object project = Rjb::import('com.aspose.tasks.Project').new(data_dir + 'test_tasks.mpp') #Define Calendar cal = project.getCalendars().add("Calendar1") # Define week days exception for christmis except = Rjb::import('com.aspose.tasks.CalendarException').new except.setEnteredByOccurrences(false) cal_object = Rjb::import('java.util.Calendar').getInstance() cal_object.set(2009, 12, 24, 0, 0, 0) except.setFromDate(cal_object.getTime()) cal_object.set(2009, 12, 31, 23, 59, 0) except.setToDate(cal_object.getTime()) except.setType(Rjb::import('com.aspose.tasks.CalendarExceptionType').Daily) except.setDayWorking(false) cal.getExceptions().add(except) puts "Defined weekdays for exceptions." end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asposetasksjava-0.0.1 | lib/asposetasksjava/Calendars/defineweekdaysforexceptions.rb |