com.pdmfc.tea.modules.util
Class SDate
java.lang.Object
|
+--com.pdmfc.tea.modules.tos.STosObj
|
+--com.pdmfc.tea.modules.util.SDate
- All Implemented Interfaces:
- SObjFunction
- public class SDate
- extends STosObj
Implements an TOS object that represents an instant in time.
|
Constructor Summary |
SDate(STosClass myClass)
Initializes the object internal state. |
|
Method Summary |
java.lang.Object |
after(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
before(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
compare(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
constructor(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
format(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
protected static SDate |
getDate(java.lang.Object[] args,
int index)
This is an utility method. |
java.lang.Object |
getDay(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
getDayOfWeek(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
getHour(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
getMinute(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
getMonth(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
getSecond(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
static java.lang.String |
getTosClassName()
|
java.lang.Object |
getYear(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
void |
initFromDate(java.util.Date date)
Changes the calendar date this object represents. |
void |
initFromDate(SDate aDate)
Initializes the object to represent the same date/time of another
SDate. |
void |
initFromString(java.lang.String str)
Initializes the object with the date represented by the string
argument. |
static SDate |
newInstance(SContext context)
|
java.lang.Object |
notSame(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
same(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
setDate(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
java.lang.Object |
setTime(SObjFunction obj,
SContext context,
java.lang.Object[] args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_calendar
public final java.util.Calendar _calendar
SDate
public SDate(STosClass myClass)
throws STeaException
- Initializes the object internal state.
initFromDate
public void initFromDate(SDate aDate)
- Initializes the object to represent the same date/time of another
SDate.
- Parameters:
aDate - The SDate object used as source.
initFromString
public void initFromString(java.lang.String str)
throws SRuntimeException
- Initializes the object with the date represented by the string
argument. The string can only have size 6, 8, 12 or 14, otherwise a
SRuntimeException is thrown.
- Throws:
SRuntimeException - When the string does not have size 6, 8, 12 or 14, or one
of the string components does not represent a valid integer.
initFromDate
public void initFromDate(java.util.Date date)
- Changes the calendar date this object represents.
- Parameters:
date - The new date this object will represent.
constructor
public java.lang.Object constructor(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
getYear
public java.lang.Object getYear(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getMonth
public java.lang.Object getMonth(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getDay
public java.lang.Object getDay(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getHour
public java.lang.Object getHour(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getMinute
public java.lang.Object getMinute(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getSecond
public java.lang.Object getSecond(SObjFunction obj,
SContext context,
java.lang.Object[] args)
getDayOfWeek
public java.lang.Object getDayOfWeek(SObjFunction obj,
SContext context,
java.lang.Object[] args)
setDate
public java.lang.Object setDate(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
setTime
public java.lang.Object setTime(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
format
public java.lang.Object format(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
compare
public java.lang.Object compare(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
before
public java.lang.Object before(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
after
public java.lang.Object after(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
same
public java.lang.Object same(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
notSame
public java.lang.Object notSame(SObjFunction obj,
SContext context,
java.lang.Object[] args)
throws SRuntimeException
getDate
protected static SDate getDate(java.lang.Object[] args,
int index)
throws STypeException
- This is an utility method. It tries to convert argument
index into a SDate.
- Parameters:
context - The context where the variable containing a date will be
searched for, if args[index] is a symbol.args - Array of Object, supposed to be the arguments received by
a call to the Tea function.index - The index of the argument to convert.- Throws:
STypeException - Thrown if args[index] is not a SDate
getTosClassName
public static java.lang.String getTosClassName()
newInstance
public static SDate newInstance(SContext context)
throws STeaException
© 2002 PDM&FC, All Rights Reserved.