Date and time


Section contents


Overview

Defined in

ce32base.oxh

Description

<TBS>


Construction / destruction


NewDateTime - Constructor

Usage

this& = NewDateTime&:(year%,month%,day%,hour%,minutes%,seconds%,microsecond%)

Description

Creates a date and time object and returns a handle which allows the object to be manipulated.

Parameters
year% The year
month% The month
day% The day
hour% The hour
minute% The minute
second% The second
microsecond% The microsecond
Return Value
this& An value which represents the created date and time
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.

Example
  LOCAL this&

  this& = NewDateTime&:
  DeleteDateTime:(this&) 

DeleteDateTime - Destructor

Usage

DeleteDateTime:(this&)

Description

Destroys the date and time object.

Arguments
this& A handle to a date and time object
Example
  LOCAL this&

  this& = NewDateTime&:
  DeleteDateTime:(this&) 

Methods provided


DateTimeDay - get day

Usage

day% = DateTimeDay%:(this&)

Description

Get the day.

Arguments
this& A handle to a date and time object
Return value
day% The day

DateTimeHour - get hour

Usage

hour% = DateTimeHour%:(this&)

Description

Get the hour.

Arguments
this& A handle to a date and time object
Return value
hour% The hour

DateTimeMicroSecond - get microsecond

Usage

microsecond% = DateTimeMicroSecond%:(this&)

Description

Get the microsecond.

Arguments
this& A handle to a date and time object
Return value
microsecond% The microsecond

DateTimeMinute - get minute

Usage

minute% = DateTimeMinute%:(this&)

Description

Get the minute.

Arguments
this& A handle to a date and time object
Return value
minute% The minute

DateTimeMonth - get month

Usage

month% = DateTimeMonth%:(this&)

Description

Get the month.

Arguments
this& A handle to a date and time object
Return value
month% The month

DateTimeSecond - get second

Usage

second% = DateTimeSecond%:(this&)

Description

Get the second.

Arguments
this& A handle to a date and time object
Return value
second% The second

DateTimeSet - set date and time

Usage

err% = DateTimeSet%:(this&,year%,month%,day%,hour%,minutes%,seconds%,microsecond%)

Description

Get the second.

Arguments
this& A handle to a date and time object
year% The year
month% The month
day% The day
hour% The hour
minute% The minute
second% The second
microsecond% The microsecond
Return value
err% An error code

DateTimeSetDay - set day

Usage

err% = DateTimeSetDay%:(this&,day%)

Description

Set the day.

Arguments
this& A handle to a date and time object
day% The day
Return value
err% An error code

DateTimeSetHour - set hour

Usage

err% = DateTimeSetHour%:(this&,hour%)

Description

Set the hour.

Arguments
this& A handle to a date and time object
hour% The hour
Return value
err% An error code

DateTimeSetMicroSecond - set microsecond

Usage

err% = DateTimeSetMicroSecond%:(this&,microsecond%)

Description

Set the microsecond.

Arguments
this& A handle to a date and time object
microsecond% The microsecond
Return value
err% An error code

DateTimeSetMinute - set minute

Usage

err% = DateTimeSetMinute%:(this&,minute%)

Description

Set the minute.

Arguments
this& A handle to a date and time object
minute% The minute
Return value
err% An error code

DateTimeSetMonth - set month

Usage

err% = DateTimeSetMonth%:(this&,month%)

Description

Set the month.

Arguments
this& A handle to a date and time object
month% The month
Return value
err% An error code

DateTimeSetSecond - set second

Usage

err% = DateTimeSetSecond%:(this&,second%)

Description

Set the second.

Arguments
this& A handle to a date and time object
second% The second
Return value
err% An error code

DateTimeSetYear - set year

Usage

err% = DateTimeSetYear%:(this&,year%)

Description

Set the year.

Arguments
this& A handle to a date and time object
year% The year
Return value
err% An error code

DateTimeSetYearLeapCheck - set year with leap year check

Usage

err% = DateTimeSetYearLeapCheck%:(this&,year%)

Description

Set the year, checking for a leap year.

Arguments
this& A handle to a date and time object
year% The year
Return value
err% An error code