smjg.libs.util.datetime.DateTimeComponents Struct Reference

The smjg.libs.util.datetime.DateTimeComponents structure represents a date and time in structured form. More...

List of all members.

Public Member Functions

string format (cstring formatString)
 Formats this date and time according to a format string.
Properties
DateValue dateValue ()
 The DateValue corresponding to the date stored in this DateTimeComponents.
DateValue dateValue (DateValue dv)
 The DateValue corresponding to the date stored in this DateTimeComponents.
TimeValue timeValue ()
 The TimeValue corresponding to the time stored in this DateTimeComponents.
TimeValue timeValue (TimeValue tv)
 The TimeValue corresponding to the time stored in this DateTimeComponents.

Static Public Member Functions

Pseudo-constructors
static DateTimeComponents opCall (DateValue dv)
 Constructs a DateTimeComponents of the given date.
static DateTimeComponents opCall (TimeValue tv)
 Constructs a DateTimeComponents of the given time.
static DateTimeComponents opCall (DateTime dt)
 Constructs a DateTimeComponents of the given date and time.

Public Attributes

int year = int.min
MONTH month = MONTH.UNSPEC
byte day = byte.min
byte hour = byte.min
byte minute = byte.min
byte second = byte.min
short millisecond = short.min
deprecated typedef millisecond ms


Detailed Description

The smjg.libs.util.datetime.DateTimeComponents structure represents a date and time in structured form.

Any of the data members may be set to the .min value of its type, representing an unspecified component.


Member Function Documentation

static DateTimeComponents smjg.libs.util.datetime.DateTimeComponents.opCall ( DateValue  dv  )  [static]

Constructs a DateTimeComponents of the given date.

Parameters:
dv date with which to fill structure
Returns:
a DateTimeComponents with the date components extracted from dv, and the time components unspecified.

static DateTimeComponents smjg.libs.util.datetime.DateTimeComponents.opCall ( TimeValue  tv  )  [static]

Constructs a DateTimeComponents of the given time.

Parameters:
tv time with which to fill structure
Returns:
a DateTimeComponents with the time components extracted from tv, and the date components unspecified.

static DateTimeComponents smjg.libs.util.datetime.DateTimeComponents.opCall ( DateTime  dt  )  [static]

Constructs a DateTimeComponents of the given date and time.

Parameters:
dt date and time with which to fill structure
Returns:
a DateTimeComponents with the date and time components extracted from dt.

string smjg.libs.util.datetime.DateTimeComponents.format ( cstring  formatString  ) 

Formats this date and time according to a format string.

Parameters:
formatString the format string, as defined in smjg.libs.util.datetimeformat.
Returns:
the formatted date string.
Exceptions:
DateTimeFormatException if the formatting fails, e.g. because of an error in the format string.

DateValue smjg.libs.util.datetime.DateTimeComponents.dateValue (  ) 

The DateValue corresponding to the date stored in this DateTimeComponents.

Exceptions:
DateTimeException if the date stored in this DateTimeComponents is invalid or incomplete.

DateValue smjg.libs.util.datetime.DateTimeComponents.dateValue ( DateValue  dv  ) 

The DateValue corresponding to the date stored in this DateTimeComponents.

TimeValue smjg.libs.util.datetime.DateTimeComponents.timeValue (  ) 

The TimeValue corresponding to the time stored in this DateTimeComponents.

Exceptions:
DateTimeException if the time stored in this DateTimeComponents is invalid or incomplete.

TimeValue smjg.libs.util.datetime.DateTimeComponents.timeValue ( TimeValue  tv  ) 

The TimeValue corresponding to the time stored in this DateTimeComponents.


Member Data Documentation

int smjg.libs.util.datetime.DateTimeComponents.year = int.min

MONTH smjg.libs.util.datetime.DateTimeComponents.month = MONTH.UNSPEC

byte smjg.libs.util.datetime.DateTimeComponents.day = byte.min

byte smjg.libs.util.datetime.DateTimeComponents.hour = byte.min

byte smjg.libs.util.datetime.DateTimeComponents.minute = byte.min

byte smjg.libs.util.datetime.DateTimeComponents.second = byte.min

short smjg.libs.util.datetime.DateTimeComponents.millisecond = short.min

deprecated typedef millisecond smjg.libs.util.datetime.DateTimeComponents.ms


The documentation for this struct was generated from the following file:
Generated on Sun Sep 13 19:50:35 2009 for Stewart's Utility Library by  doxygen 1.5.4