Module: Asposetasksjava::GetCalendarExceptions

Defined in:
lib/asposetasksjava/Calendars/getcalendarexceptions.rb

Instance Method Summary collapse

Instance Method Details

#initializeObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/asposetasksjava/Calendars/getcalendarexceptions.rb', line 3

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')

    calendars = project.getCalendars().toList()

    i = 0
    while i < calendars.size()
      cal = calendars.get(i)
      calexc = cal.getExceptions().getCount()
      if calexc > 0
        puts "From: " + calexc.getFromDate().toString()
        puts "To: " + calexc.getToDate().toString()
      end
      i +=1
    end
end