Simple concept to facilitate the work with dates. Because on the World
Wide Web there is no common denominator between date representation
this concept has the purpose to assist the user in parsing and
formatting dates. To specify the time format use a time pattern string.
In this pattern, all ASCII letters are reserved as pattern letters,
which are defined as the following:
Symbol Meaning Presentation Example
------ ------- ------------ -------
G era designator (Text) AD
y year (Number) 1996
M month in year (Text & Number) July & 07
d day in month (Number) 10
h hour in am/pm (1~12) (Number) 12
H hour in day (0~23) (Number) 0
m minute in hour (Number) 30
s second in minute (Number) 55
S millisecond (Number) 978
E day in week (Text) Tuesday
D day in year (Number) 189
F day of week in month (Number) 2 (2nd Wed in July)
w week in year (Number) 27
W week in month (Number) 2
a am/pm marker (Text) PM
k hour in day (1~24) (Number) 24
K hour in am/pm (0~11) (Number) 0
z time zone (Text) Pacific Standard Time
' escape for text (DelimiMerlinter)
'' single quote (Literal) '
Displaing the current date
print Date.getToday.toTXT
Tue Apr 23 12:28:40 EEST 2002
Parsing and reformating a date
$date = Date.create("MMM d, ''yy", "July 10, '96")
PRINT $date.getDate("EEE, d MMM yyyy")
Wed, 10 Jul 1996
Methods inherited from: Concept
cloneConcept, extendsConcept, fromXML, getAllInheritedConcepts, getConceptAttribute, getConceptAttributeField, getConceptAttributeFields, getConceptAttributes, getConceptConstructors, getConceptElement, getConceptElementField, getConceptElementFields, getConceptElements, getConceptLabel, getConceptMethod, getConceptMethods, getConceptOperators, getConceptType, getConceptsAtPath, getErrorHandler, getInheritedConcepts, hasConceptAttribute, hasConceptElement, hasConceptMethod, hasPath, isHidden, loadContent, setConceptLabel, setErrorHandler, setHidden, setShowEmpty, showEmpty, toTXT, toXML |
|
Parameters: |
date : | The value with which the new Date will be created. |
|
Constructor which creates a new Date instance from the Integer parameter
passed in. The parameter must represent the number of miliseconds after
January, 1, 1970, 00:00:00 GMT.
Parameters: |
$pattern : | The pattern for the given date. |
$date : | The value with which the new Date will be created. |
|
Exceptions: |
illegalParameter :
(Error) |
If the parameter is not String or does not contain a valid data.
|
illegalFormat :
(Warning) |
If the parameter is not String or does not contain a valid format.
|
Constructor which creates a new Date instance by parsing the value of
the date using the parse rule defined by the pattern. The pattern can be
formated using the date attoms.
Tests if this date is before the specified date.
Returns true if and only if the instant of time
represented by this Date concept is strictly earlier than
the instant represented by when; false otherwise.
Tests if this date is after the specified date.
Returns true if and only if the instant of time
represented by this Date concept is strictly later than
the instant represented by when; false otherwise.
Tests if this date is after the specified date.
Compares two dates for equality. The result is true if
and only if the argument is a Date concept that
represents the same point in time, to the millisecond,
as this concept.
Parameters: |
$pattern : | The pattern for the returned date. |
|
Returns a string representing the date value of this concept. The
returned string is formated conform the specified pattern.
Returns the number of milliseconds since January
1, 1970, 00:00:00 GMT represented by this Date object.
Returns an instance of a Date concept representing the today's date.
Parameters: |
$date : | The new date to be set. |
|
Sets the date to the specified value.
Parameters: |
$pattern : | The pattern for the date to set. |
$date : | The new date to be set. |
|
Set the value of date by parsing the value of the date using the parse
rule defined by the pattern. The pattern can be formated using the date
atoms.
Returns a stream representing the simple text rendering of this concept.
Returns a stream representing the XML rendering of this concept.