org.sakaiproject.time.api.Time.toStringLocalFull()方法的使用及代码示例

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

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

Time.toStringLocalFull介绍

[英]Format as a string, Human Readable, full format, Local.
[中]格式为字符串,可读,完整格式,本地。

代码示例

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

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

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

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

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

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

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

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

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

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

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

public String getVisibleTimeString()
{
  if ( m_visibleTime == null )
    return "";
  else
    return m_visibleTime.toStringLocalFull();
}

代码示例来源:origin: org.sakaiproject.sitestats/sitestats-api

/** Get the localized date the report was generated. */
public String getLocalizedReportGenerationDate() {
  return TimeService.newTime(reportGenerationDate.getTime()).toStringLocalFull();
}    
/** Set the localized date the report was generated. */

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

protected String getSummaryFromHeader(Message item, MessageHeader header)
{
    String newtext;
    String body = item.getBody();
    if ( body.length() > 50 ) body = body.substring(1,49);
    String newText = body + ", " + header.getFrom().getDisplayName() + ", " + header.getDate().toStringLocalFull();
  return newText;
}

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

protected String getSummaryFromHeader(Message item, MessageHeader header)
{
    String newtext;
    String body = item.getBody();
    if ( body.length() > 50 ) body = body.substring(1,49);
    String newText = body + ", " + header.getFrom().getDisplayName() + ", " + header.getDate().toStringLocalFull();
  return newText;
}

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

protected String getSummaryFromHeader(Message item, MessageHeader header)
{
    String newtext;
    String body = item.getBody();
    if ( body.length() > 50 ) body = body.substring(1,49);
    String newText = body + ", " + header.getFrom().getDisplayName() + ", " + header.getDate().toStringLocalFull();
  return newText;
}

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

protected String getSummaryFromHeader(ChatMessage item) throws UserNotDefinedException
{
  String body = item.getBody();
  if ( body.length() > 50 ) body = body.substring(1,49);
  User user = UserDirectoryService.getUser(item.getOwner());
  Time messageTime = TimeService.newTime(item.getMessageDate().getTime());
  String newText = body + ", " + user.getDisplayName() + ", " + messageTime.toStringLocalFull();
  return newText;
}

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

return getTimeProperty(name).toStringLocalFull();

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

public String getReportTimePeriod(Report report) {
  if(report.getReportDefinition().getReportParams().getWhen().equals(ReportManager.WHEN_ALL)){
    return msgs.getString("report_when_all");
  }else{
    Time from = M_ts.newTime(report.getReportDefinition().getReportParams().getWhenFrom().getTime());
    Time to = M_ts.newTime(report.getReportDefinition().getReportParams().getWhenTo().getTime());
    return from.toStringLocalFull() + " - " + to.toStringLocalFull();
  }
}

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

/**********************************************************************************************************************************************************************************************************************************************************
 * getSummaryFromHeader implementation
 *********************************************************************************************************************************************************************************************************************************************************/
 protected String getSummaryFromHeader(Message item, MessageHeader header)
 {
  String newText;
if ( header instanceof AnnouncementMessageHeader) {
AnnouncementMessageHeader hdr = (AnnouncementMessageHeader) header;
newText = hdr.getSubject();
} else {
     newText = item.getBody();
   if ( newText.length() > 50 ) newText = newText.substring(1,49);
  }
  newText = newText + ", " + header.getFrom().getDisplayName() + ", " + header.getDate().toStringLocalFull();
  return newText;
}

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

buf.append(hdr.getDate().toStringLocalFull());
buf.append(newline);
buf.append(msg.getBody());

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

buf.append(hdr.getDate().toStringLocalFull());
buf.append(newline);
buf.append(FormattedText.convertFormattedTextToPlaintext(msg.getBody()));

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

buffer.append(rb.getString("noti.assignment.duedate") + " " + a.getDueTime().toStringLocalFull()+newline + newline);
buffer.append(rb.getString("noti.submit.time") + " " + s.getTimeSubmitted().toStringLocalFull() + newline + newline);

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

out.println("<tr><td><b>" + rb.getString("date_colon") + "</b></td><td>" + Validator.escapeHtml(hdr.getDate().toStringLocalFull())
    + "</td></tr>");
out.println("<tr><td><b>" + rb.getString("subject_colon") + "</b></td><td>" + Validator.escapeHtml(hdr.getSubject()) + "</td></tr></table>");

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

/**
 * {@inheritDoc}
 */
public String getEntityDescription(Reference ref)
{
  // double check that it's mine
  if (!APPLICATION_ID.equals(ref.getType())) return null;
  String rv = rb.getFormattedMessage("entdsc.sit", new Object[]{ref.getReference()});
  try
  {
    Site site = getSite(ref.getId());
    rv = rb.getFormattedMessage("entdsc.sit_usr", new Object[]{
        site.getTitle() + " (" + site.getId() + ")",
        site.getCreatedTime().toStringLocalFull(),
        site.getCreatedBy().getDisplayName() + " (" + site.getCreatedBy().getDisplayId() + ")",
        StringUtil.limit((site.getDescription() == null ? "" : site.getDescription()), 30)});
  }
  catch (IdUnusedException e)
  {
  }
  catch (NullPointerException e)
  {
  }
  return rv;
}

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

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();

相关文章