Package net.sf.mpxj

Examples of net.sf.mpxj.DateRange


                           String[] wh = recWorkingHours.getValue().split("\\|");
                           try
                           {
                              Date start = m_calendarTimeFormat.parse(wh[1]);
                              Date end = m_calendarTimeFormat.parse(wh[3]);
                              hours.addRange(new DateRange(start, end));
                           }
                           catch (ParseException e)
                           {
                              // silently ignore date parse exceptions
                           }
View Full Code Here


                  for (Interval interval : intervalList)
                  {
                     Date startTime = getTime(interval.getStart());
                     Date endTime = getTime(interval.getEnd());

                     m_defaultWorkingHours.add(new DateRange(startTime, endTime));

                     if (mondayHours != null)
                     {
                        mondayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (tuesdayHours != null)
                     {
                        tuesdayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (wednesdayHours != null)
                     {
                        wednesdayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (thursdayHours != null)
                     {
                        thursdayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (fridayHours != null)
                     {
                        fridayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (saturdayHours != null)
                     {
                        saturdayHours.addRange(new DateRange(startTime, endTime));
                     }

                     if (sundayHours != null)
                     {
                        sundayHours.addRange(new DateRange(startTime, endTime));
                     }
                  }
               }
            }
         }
View Full Code Here

                  ProjectCalendarException exception = mpxjCalendar.addCalendarException(exceptionDate, exceptionDate);
                  if (getInt(day.getId()) == 0)
                  {
                     for (int hoursIndex = 0; hoursIndex < m_defaultWorkingHours.size(); hoursIndex++)
                     {
                        DateRange range = m_defaultWorkingHours.get(hoursIndex);
                        exception.addRange(range);
                     }
                  }
               }
            }
View Full Code Here

      else
      {
         recordNumber = MPXConstants.RESOURCE_CALENDAR_HOURS_RECORD_NUMBER;
      }

      DateRange range1 = record.getRange(0);
      if (range1 == null)
      {
         range1 = DateRange.EMPTY_RANGE;
      }

      DateRange range2 = record.getRange(1);
      if (range2 == null)
      {
         range2 = DateRange.EMPTY_RANGE;
      }

      DateRange range3 = record.getRange(2);
      if (range3 == null)
      {
         range3 = DateRange.EMPTY_RANGE;
      }

      m_buffer.append(recordNumber);
      m_buffer.append(m_delimiter);
      m_buffer.append(format(record.getDay()));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range1.getStart())));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range1.getEnd())));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range2.getStart())));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range2.getEnd())));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range3.getStart())));
      m_buffer.append(m_delimiter);
      m_buffer.append(format(formatTime(range3.getEnd())));
      stripTrailingDelimiters(m_buffer);
      m_buffer.append(MPXConstants.EOL);

      m_writer.write(m_buffer.toString());
   }
View Full Code Here

TOP

Related Classes of net.sf.mpxj.DateRange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.