?? absolutedaterange.java
字號:
/* * $RCSfile: AbsoluteDateRange.java,v $ * $Revision: 1.1 $ * $Date: 2002/11/20 04:03:17 $ * * Copyright (C) 1999-2002 CoolServlets, Inc. All rights reserved. * * This software is the proprietary information of CoolServlets, Inc. * Use is subject to license terms. */package com.struts2.framework.util;import java.text.DateFormat;import java.util.Date;/** * Represents a date range between two fixed instances in time. */public class AbsoluteDateRange implements DateRange { private static final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT); private Date startDate; private Date endDate; /** * */ public String getDisplayName() { return dateFormat.format(startDate) + "-" + dateFormat.format(endDate); } /** * Creates a representation of an absolute date range based on * <tt>startDate</tt> and <tt>endDate</tt>. * * @param startDate the starting date of this date range. * @param endDate the ending date of this date range. */ public AbsoluteDateRange(Date startDate, Date endDate) { this.startDate = startDate; this.endDate = endDate; } /** * Returns the start date passed into the constructor. The specified date * is ignored since it is not relevant to an absolute date. * * @return the starting date of this date range. */ public Date getStartDate(Date date) { return startDate; } /** * Returns the end date passed into the constructor. The specified date * is ignored since it is not relevant to an absolute date. * * @return the ending date of this date range. */ public Date getEndDate(Date date) { return endDate; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -