org.sakaiproject.time.api.Time类的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(172)

本文整理了Java中org.sakaiproject.time.api.Time类的一些代码示例,展示了Time类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Time类的具体详情如下:
包路径:org.sakaiproject.time.api.Time
类名称:Time

Time介绍

[英]Time ...
[中]时间

代码示例

代码示例来源:origin: sakaiproject/sakai

public Long getModified() {
  return modified.getTime();
}
public void setModified(Time modified) {

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

/**
 * @inheritDoc
 */
 public String getDropDeadTimeString()
 {
   if ( m_dropDeadTime == null )
     return "";
   else
     return m_dropDeadTime.toStringLocalFull();
 }

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * is this time in my range?
 *
 * @param time:
 *        the time to check for inclusion
 * @return true if the time is in the range, false if not
 */
public boolean contains(Time time)
{
  // assume in range, unless proven otherwise
  boolean inRange = true;
  // if out of the range...
  if (time.before(m_startTime) || time.after(m_endTime))
  {
    inRange = false;
  }
  // if at begin and begin not in range
  else if ((!m_startIncluded) && time.equals(m_startTime))
  {
    inRange = false;
  }
  // if at the end and end not in range
  else if ((!m_endIncluded) && time.equals(m_endTime))
  {
    inRange = false;
  }
  return inRange;
} // contains

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

/**
 * Shift the time range back an intervel
 *
 * @param i
 *        time intervel in ms
 */
public void shiftBackward(long i)
{
  m_startTime.setTime(m_startTime.getTime() - i);
  m_endTime.setTime(m_endTime.getTime() - i);
}

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

public void setRetractDate(Time time)
{
  if(time == null)
  {
    if(m_retractDate != null) {
      this.m_visibilityUpdated = true;
    }
    m_retractDate = null;
  }
  else
  {
    if(m_retractDate == null || m_retractDate.compareTo(time) != 0) {
      this.m_visibilityUpdated = true;
    }
    m_retractDate = timeService.newTime(time.getTime());
  }
  m_hidden = false;
}

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

if (returnTime != null && returnTime.before(submitTime))
    retVal = rb.getString("gen.resub") + " " + submitTime.toStringLocalFull();
    if (submitTime.after(getAssignment().getDueTime()))
      retVal = retVal + rb.getString("gen.late2");
    retVal = rb.getString("gen.subm4") + " " + submitTime.toStringLocalFull();
if (lastModTime != null && returnTime != null && lastModTime.after(TimeService.newTime(returnTime.getTime() + 1000 * 10)) && !allowGrade)

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

|| (submittedTime != null && (s.getTimeLastModified().getTime() - submittedTime.getTime()) > 1000*60 /*make sure the last modified time is at least one minute after the submit time*/)))
|| (submittedTime != null && returnedTime.after(submittedTime))/*returning normal submissions*/ 
|| (submittedTime != null && submittedTime.after(returnedTime) && s.getTimeLastModified().after(submittedTime))/*grading the resubmitted assignment*/))

代码示例来源:origin: sakaiproject/sakai

MessageHeader header = item.getHeader();
Time newTime = header.getDate();
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
String newText = getSummaryFromHeader(item, header);
if ( summaryText == null ) {
m.put(Summary.PROP_PUBDATE, pubDate.toStringRFC822Local());

代码示例来源:origin: org.sakaiproject.assignment/sakai-assignment-impl

/**
 * peer assessment is set for this assignment but the close time hasn't passed
 * @return
 */
public boolean isPeerAssessmentPending(){
  if(getAllowPeerAssessment()){
    Time now = TimeService.newTime();
    return now.before(getCloseTime());
  }else{
    return false;
  }
}
/**

代码示例来源:origin: sakaiproject/sakai

public int compare(Object o1, Object o2)
  {
    // if the same object
    if (o1 == o2) return 0;
    // assume they are Resource
    Entity r1 = (Entity) o1;
    Entity r2 = (Entity) o2;
    // get each one's date
    Time t1 = m_user.getDate(r1);
    Time t2 = m_user.getDate(r2);
    // compare based on date
    int compare = t2.compareTo(t1);
    return compare;
  }
});

代码示例来源:origin: org.sakaiproject.signup/signup-impl

getTime(timeslot.getStartTime()).toStringLocalTime(),
      getTime(timeslot.getEndTime()).toStringLocalTime(),
      getTime(timeslot.getStartTime()).toStringLocalDate(),
      getSakaiFacade().getTimeService().getLocalTimeZone().getID()};
  message.append(MessageFormat.format(rb.getString("body.meeting.timeslot.timeframe"), paramsTimeframe));
} else {
  Object[] paramsTimeframe = new Object[] {
      getTime(timeslot.getStartTime()).toStringLocalTime(),
      getTime(timeslot.getStartTime()).toStringLocalShortDate(),
      getTime(timeslot.getEndTime()).toStringLocalTime(),
      getTime(timeslot.getEndTime()).toStringLocalShortDate(),
      getSakaiFacade().getTimeService().getLocalTimeZone().getID()};
  message.append(MessageFormat.format(rb.getString("body.meeting.crossdays.timeslot.timeframe"),

代码示例来源:origin: sakaiproject/sakai

public boolean after(Time timeStamp) {
    if (modified.after(timeStamp)) {
      return true;
    }
    return false;
  }
}

代码示例来源:origin: org.sakaiproject.signup/signup-impl

@Override
public String getSubject() {
  return MessageFormat.format(rb.getString("subject.organizer.change.appointment.field"), new Object[] {
        getTime(item.getRemovedFromTimeslot().get(0).getStartTime()).toStringLocalDate(),
        getTime(item.getRemovedFromTimeslot().get(0).getStartTime()).toStringLocalTime(),
        getAbbreviatedMeetingTitle() });
}

代码示例来源:origin: org.sakaiproject.signup/signup-impl

@Override
public String getSubject() {
  return MessageFormat.format(rb.getString("subject.promote.appointment.field"), new Object[] { getTime(
      meeting.getStartTime()).toStringLocalDate(), getAbbreviatedMeetingTitle() });
}

代码示例来源:origin: sakaiproject/sakai

String title = ref.getDescription();
MessageHeader messageHead = message.getHeader();
String date = messageHead.getDate().toStringLocalFullZ();

代码示例来源:origin: org.sakaiproject.portal/sakai-portal-impl

m.put("rssPubDate", (modDate.toStringRFC822Local()));

代码示例来源:origin: org.sakaiproject.kernel/sakai-kernel-impl

public void setReleaseDate(Time time)
{
  if(time == null)
  {
    if(m_releaseDate != null) {
      this.m_visibilityUpdated = true;
    }
    m_releaseDate = null;
  }
  else
  {
    if(m_releaseDate == null || m_releaseDate.compareTo(time) != 0) {
      this.m_visibilityUpdated = true;
    }
    m_releaseDate = timeService.newTime(time.getTime());
  }
  m_hidden = false;
}

代码示例来源:origin: sakaiproject/sakai

/**
 * Set the date/time the message was sent to the channel.
 * 
 * @param date
 *        The date/time the message was sent to the channel.
 */
public void setDate(Time date)
{
  if (!date.equals(m_date))
  {
    m_date.setTime(date.getTime());
  }
} // setDate

代码示例来源:origin: org.sakaiproject.message/sakai-message-impl

MessageHeader header = item.getHeader();
Time newTime = header.getDate();
if ( pubDate == null || newTime.before(pubDate) ) pubDate = newTime;
String newText = getSummaryFromHeader(item, header);
if ( summaryText == null ) {
m.put(Summary.PROP_PUBDATE, pubDate.toStringRFC822Local());

代码示例来源:origin: sakaiproject/sakai

if (m_user.getDate(candidate).before(afterDate))

相关文章