SophiaFramework UNIVERSE 5.3 |
The SFXDateDuration class is used to perform various operations regarding the SFXDate class. This class has the date duration in seconds internally.
Example 813. Calculate date (subtraction)
SFXDate date1(2008, 10, 12, 22, 45, 58); SFXDate date2(2008, 10, 12, 22, 55, 48); // calculate date duration SFXDateDuration duration = date2 - date1; SInt32 n1 = duration.AsSInt32(); // n1 = 590 duration.Set(date1 - date2); SInt32 n2 = duration.AsSInt32(); // n2 = -590
Constructor/Destructor |
---|
SFXDateDuration( Void ) Constructor of the SFXDateDuration class.
|
SFXDateDuration(
SFXDateDurationConstRef param
) Constructor of the SFXDateDuration class.
|
SFXDateDuration(
SInt32 day
, SInt32 hour
, SInt32 minute
, SInt64 second
) Constructor of the SFXDateDuration class.
|
SFXDateDuration(
SInt32 hour
, SInt32 minute
, SInt64 second
) Constructor of the SFXDateDuration class.
|
SFXDateDuration(
SInt32 minute
, SInt64 second
) Constructor of the SFXDateDuration class.
|
SFXDateDuration(
SInt64 second
) Constructor of the SFXDateDuration class.
|
Public Functions | |
---|---|
Void |
Add(
SFXDateDurationConstRef param
) Add the specified date duration to this date duration.
|
SInt64 |
AsSInt64( Void ) Convert this date duration into seconds.
|
SInt32 |
Compare(
SFXDateDurationConstRef param
) Compare this date duration with the specified date duration.
|
Void |
Div(
SInt32 param
) Divide this date duration by the specified value.
|
Bool |
Equals(
SFXDateDurationConstRef param
) Check whether this date duration equals the specified date duration or not.
|
static SFXDateDuration |
LocalTimeOffset( Void ) Get the local time zone offset from UTC.
|
Void |
Mod(
SInt32 param
) Get the remainder of the divison of this date duration by the specified value.
|
Void |
Mul(
SInt32 param
) Multiply this date duration by the specified value.
|
Void |
Neg( Void ) Negate the sign of the date duration.
|
static SFXDateDuration |
Offset19000101( Void ) Get the time offset since January 1, 1900.
|
static SFXDateDuration |
Offset19700101( Void ) Get the time offset since January 1, 1970.
|
Void |
Set(
SFXDateDurationConstRef param
) Set the date duration.
|
Void |
Set(
SInt32 day
, SInt32 hour
, SInt32 minute
, SInt64 second
) Set the date duration.
|
Void |
Set(
SInt32 hour
, SInt32 minute
, SInt64 second
) Set the date duration.
|
Void |
Set(
SInt32 minute
, SInt64 second
) Set the date duration.
|
Void |
Set(
SInt64 second
) Set the date duration.
|
Void |
Sub(
SFXDateDurationConstRef param
) Subtract the specified date duration from this date duration.
|
static SFXDateDurationConstRef |
ZeroInstance( Void ) Get the instance that represents 0.
|
SFXDateDurationRef |
operator%=(
SInt32 param
) Get the remainder of the divison of this date duration by the specified value.
|
SFXDateDurationRef |
operator*=(
SInt32 param
) Multiply this date duration by the specified value.
|
SFXDateDurationRef |
operator+=(
SFXDateDurationConstRef param
) Add the specified value to this date duration.
|
SFXDateDurationRef |
operator-=(
SFXDateDurationConstRef param
) Subtract the specified value from this date duration.
|
SFXDateDurationRef |
operator/=(
SInt32 param
) Divide this date duration by the specified value.
|
SFXDateDurationRef |
operator=(
SFXDateDurationConstRef param
) Assign the specified date duration.
|
SFXDateDuration |
operator/(
SFXDateDurationConstRef left
, SInt32 right
) Divide this date duration by the specified value.
|
Bool |
operator==(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the "==" relation.
|
Bool |
operator>=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the >= relation.
|
Bool |
operator>(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the > relation.
|
Bool |
operator<=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the <= relation.
|
Bool |
operator<(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the < relation.
|
SFXDateDuration |
operator-( Void ) Subtract the specified value from this date duration.
|
SFXDateDuration |
operator-(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Subtract the specified value from this date duration.
|
SFXDateDuration |
operator%(
SFXDateDurationConstRef left
, SInt32 right
) Get the remainder of the divison of this date duration by the specified value.
|
SFXDateDuration |
operator*(
SFXDateDurationConstRef left
, SInt32 right
) Multiply this date duration by the specified value.
|
Bool |
operator!=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the "!=" relation.
|
SFXDateDuration |
operator+( Void ) Add the specified value to this date duration.
|
SFXDateDuration |
operator+(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Add the specified value to this date duration.
|
Global Functions | |
---|---|
SFXDateDuration |
operator/(
SFXDateDurationConstRef left
, SInt32 right
) Divide this date duration by the specified value.
|
Bool |
operator==(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the "==" relation.
|
Bool |
operator>=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the >= relation.
|
Bool |
operator>(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the > relation.
|
Bool |
operator<=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the <= relation.
|
Bool |
operator<(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the < relation.
|
SFXDateDuration |
operator-( Void ) Subtract the specified value from this date duration.
|
SFXDateDuration |
operator-(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Subtract the specified value from this date duration.
|
SFXDateDuration |
operator%(
SFXDateDurationConstRef left
, SInt32 right
) Get the remainder of the divison of this date duration by the specified value.
|
SFXDateDuration |
operator*(
SFXDateDurationConstRef left
, SInt32 right
) Multiply this date duration by the specified value.
|
Bool |
operator!=(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Check the "!=" relation.
|
SFXDateDuration |
operator+( Void ) Add the specified value to this date duration.
|
SFXDateDuration |
operator+(
SFXDateDurationConstRef left
, SFXDateDurationConstRef right
) Add the specified value to this date duration.
|
[ public, explicit ] SFXDateDuration(Void);
[ public ] SFXDateDuration( SFXDateDurationConstRef param // source date duration );
[ public, explicit ] SFXDateDuration( SInt32 day // date duration (days) SInt32 hour // date duration (hours) SInt32 minute // date duration (minutes) SInt64 second // date duration (seconds) );
[ public, explicit ] SFXDateDuration( SInt32 hour // date duration (hours) SInt32 minute // date duration (minutes) SInt64 second // date duration (seconds) );
[ public, explicit ] SFXDateDuration( SInt32 minute // date duration (minutes) SInt64 second // date duration (seconds) );
[ public, explicit ] SFXDateDuration( SInt64 second // date duration (seconds) );
[ public ] Void Add( SFXDateDurationConstRef param // date duration to add );
SFXDateDuration::Div | SFXDateDuration::Mod | SFXDateDuration::Mul | SFXDateDuration::Neg | SFXDateDuration::Sub
[ public, const ] SInt64 AsSInt64(Void);
[ public, const ] SInt32 Compare( SFXDateDurationConstRef param // date duration to compare with );
When the value of param argument is 0, this operation is not defined.
SFXDateDuration::Add | SFXDateDuration::Mod | SFXDateDuration::Mul | SFXDateDuration::Neg | SFXDateDuration::Sub
[ public, const ] Bool Equals( SFXDateDurationConstRef param // date duration to compare with );
operator== | operator!= | operator> | operator>= | operator< | operator<=
[ public, static ] SFXDateDuration LocalTimeOffset(Void);
When the value of param argument is 0, this operation is not defined.
SFXDateDuration::Add | SFXDateDuration::Div | SFXDateDuration::Mul | SFXDateDuration::Neg | SFXDateDuration::Sub
SFXDateDuration::Add | SFXDateDuration::Div | SFXDateDuration::Mod | SFXDateDuration::Neg | SFXDateDuration::Sub
[ public ] Void Neg(Void);
SFXDateDuration::Add | SFXDateDuration::Div | SFXDateDuration::Mod | SFXDateDuration::Mul | SFXDateDuration::Sub
[ public, static ] SFXDateDuration Offset19000101(Void);
Return the time offset since January 1, 1900, 0:0:0.
Calculate the elapsed time from January 1, 1900, 0:0:0 to July 21, 2008, 12:14:35.
SFXDate date(2008, 7, 21, 12, 14, 35); SFXDateDuration duration(date.AsUInt32()); UInt64 second; duration += SFXDateDuration::Offset19000101(); second = duration.AsSInt64();
[ public, static ] SFXDateDuration Offset19700101(Void);
Return the time offset since January 1, 1970, 0:0:0.
Calculate the elapsed time from January 1, 1970, 0:0:0 to July 21, 2008, 12:14:35.
SFXDate date(2008, 7, 21, 12, 14, 35); SFXDateDuration duration(date.AsUInt32()); UInt64 second; duration += SFXDateDuration::Offset19700101(); second = duration.AsSInt64();
[ public ] Void Set( SFXDateDurationConstRef param // value to set (date duration) );
[ public ] Void Set( SInt32 day // value to set (day) SInt32 hour // value to set (hours) SInt32 minute // value to set (minutes) SInt64 second // value to set (seconds) );
[ public ] Void Set( SInt32 hour // value to set (hours) SInt32 minute // value to set (minutes) SInt64 second // value to set (seconds) );
[ public ] Void Set( SInt32 minute // value to set (minutes) SInt64 second // value to set (seconds) );
[ public ] Void Set( SInt64 second // value to set (seconds) );
[ public ] Void Sub( SFXDateDurationConstRef param // date duration to subtract );
SFXDateDuration::Add | SFXDateDuration::Div | SFXDateDuration::Mod | SFXDateDuration::Mul | SFXDateDuration::Neg
[ public, static ] SFXDateDurationConstRef ZeroInstance(Void);
Return the instance where every member variable is 0.
[ public ] SFXDateDurationRef operator=( SFXDateDurationConstRef param // date duration to assign );
operator% | SFXDateDuration::operator%= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public ] SFXDateDurationRef operator/=( SInt32 param // value to divide );
When the value of param argument is 0, this operation is not defined.
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public, friend ] SFXDateDuration operator/( SFXDateDurationConstRef left // date duration SInt32 right // value to divide );
When the value of right argument is 0, this operation is not defined.
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public, friend ] Bool operator==( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compared with );
SFXDateDuration::Equals | operator> | operator>= | operator< | operator<= | operator!=
[ public, friend ] Bool operator>=( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compared with );
SFXDateDuration::Equals | operator== | operator> | operator< | operator<= | operator!=
[ public, friend ] Bool operator>( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compared with );
SFXDateDuration::Equals | operator== | operator> | operator< | operator<= | operator!=
[ public, friend ] Bool operator<=( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compare with );
SFXDateDuration::Equals | operator== | operator> | operator>= | operator< | operator!=
[ public, friend ] Bool operator<( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compare with );
SFXDateDuration::Equals | operator== | operator> | operator>= | operator<= | operator!=
[ public ] SFXDateDurationRef operator-=( SFXDateDurationConstRef param // value to subtract );
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public, const ] SFXDateDuration operator-(Void);
[ public, friend ] SFXDateDuration operator-( SFXDateDurationConstRef left // date duration to be subtracted from SFXDateDurationConstRef right // value to subtract );
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public ] SFXDateDurationRef operator%=( SInt32 param // value to divide );
When the value of param argument is 0, this operation is not defined.
operator% | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public, friend ] SFXDateDuration operator%( SFXDateDurationConstRef left // date duration to be divided SInt32 right // value to divide );
When the value of right argument is 0, this operation is not defined.
SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public ] SFXDateDurationRef operator*=( SInt32 param // value to multiply );
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | operator+ | SFXDateDuration::operator+=
[ public, friend ] SFXDateDuration operator*( SFXDateDurationConstRef left // date duration to be multiplied SInt32 right // value to multiply );
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | SFXDateDuration::operator*= | operator+ | SFXDateDuration::operator+=
[ public, friend ] Bool operator!=( SFXDateDurationConstRef left // date duration to be compared SFXDateDurationConstRef right // date duration to compare with );
SFXDateDuration::Equals | operator== | operator> | operator>= | operator< | operator<=
[ public ] SFXDateDurationRef operator+=( SFXDateDurationConstRef param // value to add );
operator% | SFXDateDuration::operator%= | SFXDateDuration::operator= | operator/ | SFXDateDuration::operator/= | operator- | SFXDateDuration::operator-= | operator* | SFXDateDuration::operator*= | operator+
[ public, const ] SFXDateDuration operator+(Void);
[ public, friend ] SFXDateDuration operator+( SFXDateDurationConstRef left // date duration to be added SFXDateDurationConstRef right // value to add );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |