| java.lang.Object com.caucho.config.types.Period
All known Subclasses: com.caucho.config.types.Minutes,
Period | public class Period (Code) | | Representations of time in milliseconds.
|
Field Summary | |
final public static long | DAY | final public static long | FOREVER | final public static long | HOUR | final public static long | INFINITE | static L10N | L | final public static long | MINUTE | final public static long | MONTH | final public static long | SECOND | final public static long | YEAR |
Constructor Summary | |
public | Period() | public | Period(long period) |
Method Summary | |
public void | addText(String text) Sets the text. | public long | getDefaultUnits() | public long | getPeriod() Replace with the real path. | public static long | periodEnd(long now, long period) Calculates the next period end. | public static long | periodEnd(long now, long period, QDate cal) Calculates the next period end. | public static long | toPeriod(String value) Converts a period string to a time. | public static long | toPeriod(String value, long defaultUnits) Converts a period string to a time. | public String | toString() |
DAY | final public static long DAY(Code) | | |
FOREVER | final public static long FOREVER(Code) | | |
HOUR | final public static long HOUR(Code) | | |
INFINITE | final public static long INFINITE(Code) | | |
MINUTE | final public static long MINUTE(Code) | | |
MONTH | final public static long MONTH(Code) | | 30 days
|
SECOND | final public static long SECOND(Code) | | |
YEAR | final public static long YEAR(Code) | | 365 days
|
Period | public Period(long period)(Code) | | |
addText | public void addText(String text) throws ConfigException(Code) | | Sets the text.
|
getDefaultUnits | public long getDefaultUnits()(Code) | | Returns the default units (default is 1000)
|
getPeriod | public long getPeriod()(Code) | | Replace with the real path.
|
periodEnd | public static long periodEnd(long now, long period)(Code) | | Calculates the next period end. The calculation is in local time.
Parameters: now - the current time in GMT ms since the epoch the time of the next period in GMT ms since the epoch |
periodEnd | public static long periodEnd(long now, long period, QDate cal)(Code) | | Calculates the next period end. The calculation is in local time.
Parameters: now - the current time in GMT ms since the epoch the time of the next period in GMT ms since the epoch |
toPeriod | public static long toPeriod(String value) throws ConfigException(Code) | | Converts a period string to a time.
ms | milliseconds
| s | seconds
| m | minutes
| h | hours
| D | days
| W | weeks
| M | months
| Y | years
|
|
toPeriod | public static long toPeriod(String value, long defaultUnits) throws ConfigException(Code) | | Converts a period string to a time.
ms | milliseconds
| s | seconds
| m | minutes
| h | hours
| D | days
| W | weeks
| M | months
| Y | years
|
|
|
|