PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFXDate
Class which represents a date.
#include <SFXDate.h.hpp>
class SFXDate;
SFMTYPEDEFCLASS(SFXDate)

Description

The SFXDate class internally manages the elapsed time since January 6, 1980, 00:00:00 in seconds. The SFXDateDuration class can be also used for the addition and subtraction of dates and times.

Example 810. Define a date

SFXDate date(2008, 10, 12, 23, 45, 58);   // October 12, 2008, 23:45:58

Example 811. Get a date

SInt32 n1 = date.GetYear();   // n1 = 2008
SInt32 n2 = date.GetMonth();  // n2 = 10
SInt32 n3 = date.GetDay();    // n3 = 12
SInt32 n4 = date.GetHour();   // n4 = 23
SInt32 n5 = date.GetMinute(); // n5 = 45
SInt32 n6 = date.GetSecond(); // n6 = 58

Example 812. Perform date operations

date.AddYear(1);   // year of date   = 2009
date.AddSecond(3); // second of date = 1, minute of date = 46
date.SubMonth(30); // month of date  = 4, year of date   = 2007

Reference

SFXDateDuration

Member

Constructor/Destructor
SFXDate( Void )
Constructor of the SFXDate class.
SFXDate( SFXDateConstRef param )
Constructor of the SFXDate class.
SFXDate( UInt16 year , UInt16 month , UInt16 day , UInt16 hour , UInt16 minute , UInt16 second )
Constructor of the SFXDate class.
SFXDate( UInt16 year , UInt16 month , UInt16 day )
Constructor of the SFXDate class.
SFXDate( UInt32 second )
Constructor of the SFXDate class.
SFXDate( JulianTypeConstRef julian )
Constructor of the SFXDate class.
Public Functions
Void Add( SFXDateDurationConstRef param )
Add the specified date duration.
Void AddDay( UInt16 param )
Add the specified number of days.
Void AddHour( UInt16 param )
Add the specified number of hours.
Void AddMinute( UInt16 param )
Add the specified number of minutes.
Void AddMonth( UInt16 param )
Add the specified number of months.
Void AddSecond( UInt16 param )
Add the specified number of seconds.
Void AddYear( UInt16 param )
Add the specified number of years.
JulianType AsJulianType( Void )
Convert this date into Julian date.
UInt32 AsUInt32( Void )
Convert this date into the elapsed time in seconds since January 6, 1980 00:00:00.
SInt32 Compare( SFXDateConstRef param )
Compare this date with the specified date.
static
SFXDate
CurrentDate( Void )
Get the current date/time.
static
SFXDate
CurrentUTCDate( Void )
Get the current date/time in UTC.
SFXDateDuration DurationTo( SFXDateConstRef param )
Get the date duration from this date to the specified date.
Bool Equals( SFXDateConstRef param )
Check whether this date equals the specified date or not.
SFXAnsiString Format( SFXAnsiStringConstRef format )
Convert this date into the string in the specified format.
UInt16 GetDay( Void )
Get the day of this date.
DayOfWeekEnum GetDayOfWeek( Void )
Get the day of the week of this date.
UInt16 GetHour( Void )
Get the hour of this date.
UInt16 GetMinute( Void )
Get the minute of this date.
UInt16 GetMonth( Void )
Get the month of this date.
UInt16 GetSecond( Void )
Get the second of this date.
UInt16 GetYear( Void )
Get the year of this date.
SFCError Parse( SFXAnsiStringConstRef format , SFXAnsiStringConstRef string )
Convert the specified string in a format into date.
Void Set( SFXDateConstRef param )
Set a date.
Void Set( UInt16 year , UInt16 month , UInt16 day , UInt16 hour , UInt16 minute , UInt16 second )
Set a date.
Void Set( UInt16 year , UInt16 month , UInt16 day )
Set a date.
Void Set( UInt32 second )
Set a date.
Void Set( JulianTypeConstRef julian )
Set a date.
Void SetDate( UInt16 year , UInt16 month , UInt16 day )
Set the specified date(year, month, and day) to this date.
Void SetDay( UInt16 param )
Set the specified day to this date.
Void SetHour( UInt16 param )
Set the specified hour to this date.
Void SetMinute( UInt16 param )
Set the specified minute to this date.
Void SetMonth( UInt16 param )
Set the specified month to this date.
Void SetSecond( UInt16 param )
Set the specified second to this date.
Void SetTime( UInt16 hour , UInt16 minute , UInt16 second )
Set the specified time(hour, minute, and second).
Void SetYear( UInt16 param )
Set the specified year to this date.
Void Sub( SFXDateDurationConstRef param )
Subtract the specified date duration.
Void SubDay( UInt16 param )
Subtract the specified number of days.
Void SubHour( UInt16 param )
Subtract the specified number of hours.
Void SubMinute( UInt16 param )
Subtract the specified number of minutes.
Void SubMonth( UInt16 param )
Subtract the specified number of months.
Void SubSecond( UInt16 param )
Subtract the specified number of seconds.
Void SubYear( UInt16 param )
Subtract the specified number of years.
static
SFXDateConstRef
ZeroInstance( Void )
Get the instance that represents 0.
SFXDateRef operator+=( SFXDateDurationConstRef param )
Add the specified date duration.
SFXDateRef operator-=( SFXDateDurationConstRef param )
Subtract the specified number of seconds.
SFXDateRef operator=( SFXDateConstRef param )
Assign a date.
Bool operator==( SFXDateConstRef left , SFXDateConstRef right )
Check the == (equality) relation.
Bool operator>=( SFXDateConstRef left , SFXDateConstRef right )
Check the >= relation.
Bool operator>( SFXDateConstRef left , SFXDateConstRef right )
Check the > relation.
Bool operator<=( SFXDateConstRef left , SFXDateConstRef right )
Check the <= relation.
Bool operator<( SFXDateConstRef left , SFXDateConstRef right )
Check the < relation.
SFXDate operator-( SFXDateConstRef left , SFXDateDurationConstRef right )
Subtract the specified number of seconds.
SFXDateDuration operator-( SFXDateConstRef left , SFXDateConstRef right )
Subtract the specified number of seconds.
Bool operator!=( SFXDateConstRef left , SFXDateConstRef right )
Check the "!=" relation.
SFXDate operator+( SFXDateConstRef left , SFXDateDurationConstRef right )
Add the specified date duration.
Types
DayOfWeekEnum
Constants that represent days of the week.
Global Functions
Bool operator==( SFXDateConstRef left , SFXDateConstRef right )
Check the == (equality) relation.
Bool operator>=( SFXDateConstRef left , SFXDateConstRef right )
Check the >= relation.
Bool operator>( SFXDateConstRef left , SFXDateConstRef right )
Check the > relation.
Bool operator<=( SFXDateConstRef left , SFXDateConstRef right )
Check the <= relation.
Bool operator<( SFXDateConstRef left , SFXDateConstRef right )
Check the < relation.
SFXDate operator-( SFXDateConstRef left , SFXDateDurationConstRef right )
Subtract the specified number of seconds.
SFXDateDuration operator-( SFXDateConstRef left , SFXDateConstRef right )
Subtract the specified number of seconds.
Bool operator!=( SFXDateConstRef left , SFXDateConstRef right )
Check the "!=" relation.
SFXDate operator+( SFXDateConstRef left , SFXDateDurationConstRef right )
Add the specified date duration.

SFXDate::SFXDate
Constructor of the SFXDate class.
[ public, explicit ]
SFXDate(Void);
[ public ]
SFXDate(
    SFXDateConstRef param   // source date
);
[ public, explicit ]
SFXDate(
    UInt16 year     // year
    UInt16 month    // month
    UInt16 day      // day
    UInt16 hour     // hour
    UInt16 minute   // minute
    UInt16 second   // second
);
[ public, explicit ]
SFXDate(
    UInt16 year    // year
    UInt16 month   // month
    UInt16 day     // day
);
[ public, explicit ]
SFXDate(
    UInt32 second   // elapsed time in seconds since January 6, 1980 00:00:00.
);
[ public, explicit ]
SFXDate(
    JulianTypeConstRef julian   // julian date
);

Reference

SFXDate::Set | SFXDate::operator=


SFXDate::Add
Add the specified date duration.
[ public ]
Void Add(
    SFXDateDurationConstRef param   // date duration to add
);

Reference

SFXDateDuration | SFXDate::AddDay | SFXDate::AddHour | SFXDate::AddMinute | SFXDate::AddMonth | SFXDate::AddSecond | SFXDate::AddYear | SFXDate::Sub


SFXDate::AddDay
Add the specified number of days.
[ public ]
Void AddDay(
    UInt16 param   // number of days to add
);

Reference

SFXDate::Add | SFXDate::AddHour | SFXDate::AddMinute | SFXDate::AddMonth | SFXDate::AddSecond | SFXDate::AddYear | SFXDate::SubDay


SFXDate::AddHour
Add the specified number of hours.
[ public ]
Void AddHour(
    UInt16 param   // number of hours to add
);

Reference

SFXDate::Add | SFXDate::AddDay | SFXDate::AddMinute | SFXDate::AddMonth | SFXDate::AddSecond | SFXDate::AddYear | SFXDate::SubHour


SFXDate::AddMinute
Add the specified number of minutes.
[ public ]
Void AddMinute(
    UInt16 param   // number of minutes to add
);

Reference

SFXDate::Add | SFXDate::AddDay | SFXDate::AddHour | SFXDate::AddMonth | SFXDate::AddSecond | SFXDate::AddYear | SFXDate::SubMinute


SFXDate::AddMonth
Add the specified number of months.
[ public ]
Void AddMonth(
    UInt16 param   // number of months to add
);

Reference

SFXDate::Add | SFXDate::AddDay | SFXDate::AddHour | SFXDate::AddMinute | SFXDate::AddSecond | SFXDate::AddYear | SFXDate::SubMonth


SFXDate::AddSecond
Add the specified number of seconds.
[ public ]
Void AddSecond(
    UInt16 param   // number of seconds to add
);

Reference

SFXDate::Add | SFXDate::AddDay | SFXDate::AddHour | SFXDate::AddMinute | SFXDate::AddMonth | SFXDate::AddYear | SFXDate::SubSecond


SFXDate::AddYear
Add the specified number of years.
[ public ]
Void AddYear(
    UInt16 param   // number of years to add
);

Reference

SFXDate::Add | SFXDate::AddDay | SFXDate::AddHour | SFXDate::AddMinute | SFXDate::AddMonth | SFXDate::AddSecond | SFXDate::SubYear


SFXDate::AsJulianType
Convert this date into Julian date.
[ public, const ]
JulianType AsJulianType(Void);

SFXDate::AsUInt32
Convert this date into the elapsed time in seconds since January 6, 1980 00:00:00.
[ public, const ]
UInt32 AsUInt32(Void);

Reference

SFXDate::Format


SFXDate::Compare
Compare this date with the specified date.
[ public, const ]
SInt32 Compare(
    SFXDateConstRef param   // date to compare with
);

Return value

  • If argument is a date before this date: a value greater than 0
  • If argument is a date equal this date: 0
  • If argument is a date after this date: a value less than 0

SFXDate::CurrentDate
Get the current date/time.
[ public, static ]
SFXDate CurrentDate(Void);

Example

date = SFXDate::CurrentDate();

Reference

SFXDate::CurrentUTCDate


SFXDate::CurrentUTCDate
Get the current date/time in UTC.
[ public, static ]
SFXDate CurrentUTCDate(Void);

Reference

SFXDate::CurrentDate


SFXDate::DurationTo
Get the date duration from this date to the specified date.
[ public, const ]
SFXDateDuration DurationTo(
    SFXDateConstRef param   // target date
);

Reference

SFXDateDuration


SFXDate::Equals
Check whether this date equals the specified date or not.
[ public, const ]
Bool Equals(
    SFXDateConstRef param   // date to compare with
);

Description

  • If equal: true
  • Otherwise: false

Reference

operator== | operator!=


SFXDate::Format
Convert this date into the string in the specified format.
[ public, const ]
SFXAnsiString Format(
    SFXAnsiStringConstRef format   // format
);

Argument

format

The following formats are available.

Y     - N-digit year
YY    - 2-digit year
YYYY  - 4-digit year
M     - N-digit month
MM    - 2-digit month
D     - N-digit day
DD    - 2-digit day
h     - N-digit hour 0 ~ 23
hh    - 2-digit hour 00 ~ 23
H     - N-digit hour 1 ~ 12
HH    - 2-digit hour 01 ~ 12
m     - N-digit minute
mm    - 2-digit minute
s     - N-digit second
ss    - 2-digit second
A     - AM / PM
a     - am / pm
MONTH - name of month (full name in capital letters)
Month - name of month (full name, and first leter is capital)
month - name of month (full name in small letters)
MTH   - name of month (3 letters in capital)
Mth   - name of month (3 letters with the first is capital)
mth   - name of month (3 letters in small)
WEEK  - day of week (full name in capital letters)
Week  - day of week (full name, and first leter is capital)
week  - day of week (full name in small letters)
WEK   - day of week (3 letters in capital)
Wek   - day of week (3 letters with the first is capital)
wek   - day of week (3 letters in small)
y    - day of week (Japanese)
%x   - letter 'x'

Besides, any character other than alphabets and numbers can be used.

To use an alphabet: escape with '%'.

If more than space characters in the format are lined up, these additional space characters will be skipped.

If the number of letters is insufficient, an error occurs.

Example

SFXDate date(2010, 3, 9, 14, 12, 50);

date.Format("YYYY/MM/DD hh:mm:ss"); // "2010/03/09 14:12:50"
date.Format(""DD Mth, YY");         // "09 Mar, 10"

Reference

SFXDate::AsUInt32 | SFXDate::Parse


SFXDate::GetDay
Get the day of this date.
[ public, const ]
UInt16 GetDay(Void);

Reference

SFXDate::GetDayOfWeek | SFXDate::GetHour | SFXDate::GetMinute | SFXDate::GetMonth | SFXDate::GetSecond | SFXDate::GetYear | SFXDate::SetDay


SFXDate::GetDayOfWeek
Get the day of the week of this date.
[ public, const ]
DayOfWeekEnum GetDayOfWeek(Void);

Return value

Return SFXDate::DayOfWeekEnum type.

Reference

SFXDate::DayOfWeekEnum


SFXDate::GetHour
Get the hour of this date.
[ public, const ]
UInt16 GetHour(Void);

Reference

SFXDate::GetDay | SFXDate::GetDayOfWeek | SFXDate::GetMinute | SFXDate::GetMonth | SFXDate::GetSecond | SFXDate::GetYear | SFXDate::SetHour


SFXDate::GetMinute
Get the minute of this date.
[ public, const ]
UInt16 GetMinute(Void);

Reference

SFXDate::GetDay | SFXDate::GetDayOfWeek | SFXDate::GetHour | SFXDate::GetMonth | SFXDate::GetSecond | SFXDate::GetYear | SFXDate::SetMinute


SFXDate::GetMonth
Get the month of this date.
[ public, const ]
UInt16 GetMonth(Void);

Reference

SFXDate::GetDay | SFXDate::GetDayOfWeek | SFXDate::GetHour | SFXDate::GetMinute | SFXDate::GetSecond | SFXDate::GetYear | SFXDate::SetMonth


SFXDate::GetSecond
Get the second of this date.
[ public, const ]
UInt16 GetSecond(Void);

Reference

SFXDate::GetDay | SFXDate::GetDayOfWeek | SFXDate::GetHour | SFXDate::GetMinute | SFXDate::GetMonth | SFXDate::GetYear | SFXDate::SetSecond


SFXDate::GetYear
Get the year of this date.
[ public, const ]
UInt16 GetYear(Void);

Reference

SFXDate::GetDay | SFXDate::GetDayOfWeek | SFXDate::GetHour | SFXDate::GetMinute | SFXDate::GetMonth | SFXDate::GetSecond | SFXDate::SetYear


SFXDate::Parse
Convert the specified string in a format into date.
[ public ]
SFCError Parse(
    SFXAnsiStringConstRef format   // format
    SFXAnsiStringConstRef string   // string to be converted into date
);

Argument

format

The following formats are available.

Y     - N-digit year
YY    - 2-digit year
YYYY  - 4-digit year
M     - N-digit month
MM    - 2-digit month
D     - N-digit day
DD    - 2-digit day
h     - N-digit hour 0 ~ 23
hh    - 2-digit hour 00 ~ 23
H     - N-digit hour 1 ~ 12
HH    - 2-digit hour 01 ~ 12
m     - N-digit minute
mm    - 2-digit minute
s     - N-digit second
ss    - 2-digit second
A     - AM / PM
a     - am / pm
MONTH - name of month (full name in capital letters)
Month - name of month (full name, and first leter is capital)
month - name of month (full name in small letters)
MTH   - name of month (3 letters in capital)
Mth   - name of month (3 letters with the first is capital)
mth   - name of month (3 letters in small)
WEEK  - day of week (full name in capital letters)
Week  - day of week (full name, and first leter is capital)
week  - day of week (full name in small letters)
WEK   - day of week (3 letters in capital)
Wek   - day of week (3 letters with the first is capital)
wek   - day of week (3 letters in small)
y    - day of week (Japanese)
%x   - letter 'x'

Besides, any character other than alphabets and numbers can be used.

To use an alphabet: escape with '%'.

If more than space characters in the format are lined up, these additional space characters will be skipped.

If the number of letters is insufficient, an error occurs.

string

Get the string converted to date.

Return value

  • If succeeds: SFERR_NO_ERROR
  • If invalid format: SFERR_INVALID_FORMAT
  • If insufficient memory: SFERR_NO_MEMORY

Example

SFXDate date;

// convert the string to date according the format "YYYY/MM/DD hh:mm:ss" 
date.Parse("YYYY/MM/DD hh:mm:ss", "2006/06/15 15:13:30");

// display character 'M' by %M
// two or more white spaces are considered to be one. 
date.Parse("%M%y = YYYY/MM/DD hh:mm:ss", "My   =  2006/06/15 15:13:30");

Reference

SFXDate::AsUInt32 | SFXDate::Format


SFXDate::Set
Set a date.
[ public ]
Void Set(
    SFXDateConstRef param   // date (SFXDate)
);
[ public ]
Void Set(
    UInt16 year     // year
    UInt16 month    // month
    UInt16 day      // day
    UInt16 hour     // hour
    UInt16 minute   // minute
    UInt16 second   // second
);
[ public ]
Void Set(
    UInt16 year    // year
    UInt16 month   // month
    UInt16 day     // day
);
[ public ]
Void Set(
    UInt32 second   // number of seconds since January 6, 1980 00:00:00.
);
[ public ]
Void Set(
    JulianTypeConstRef julian   // julian date
);

Description

In case of the function prototype that only year, month, and date are specified as arguments, 0 is set to hour, minute, and second of this date.

Reference

SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear | SFXDate::operator=


SFXDate::SetDate
Set the specified date(year, month, and day) to this date.
[ public ]
Void SetDate(
    UInt16 year    // year
    UInt16 month   // month
    UInt16 day     // day
);

Reference

SFXDate::Set | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetDay
Set the specified day to this date.
[ public ]
Void SetDay(
    UInt16 param   // day
);

Reference

SFXDate::GetDay | SFXDate::Set | SFXDate::SetDate | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetHour
Set the specified hour to this date.
[ public ]
Void SetHour(
    UInt16 param   // hour
);

Reference

SFXDate::GetHour | SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetMinute
Set the specified minute to this date.
[ public ]
Void SetMinute(
    UInt16 param   // minute
);

Reference

SFXDate::GetMinute | SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetMonth
Set the specified month to this date.
[ public ]
Void SetMonth(
    UInt16 param   // month
);

Reference

SFXDate::GetMonth | SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetSecond | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetSecond
Set the specified second to this date.
[ public ]
Void SetSecond(
    UInt16 param   // second
);

Reference

SFXDate::GetSecond | SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetTime | SFXDate::SetYear


SFXDate::SetTime
Set the specified time(hour, minute, and second).
[ public ]
Void SetTime(
    UInt16 hour     // hour
    UInt16 minute   // minute
    UInt16 second   // second
);

Reference

SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetYear


SFXDate::SetYear
Set the specified year to this date.
[ public ]
Void SetYear(
    UInt16 param   // year
);

Reference

SFXDate::GetYear | SFXDate::Set | SFXDate::SetDate | SFXDate::SetDay | SFXDate::SetHour | SFXDate::SetMinute | SFXDate::SetMonth | SFXDate::SetSecond | SFXDate::SetTime


SFXDate::Sub
Subtract the specified date duration.
[ public ]
Void Sub(
    SFXDateDurationConstRef param   // date duration
);

Reference

SFXDateDuration | SFXDate::Add | SFXDate::SubDay | SFXDate::SubHour | SFXDate::SubMinute | SFXDate::SubMonth | SFXDate::SubSecond | SFXDate::SubYear |


SFXDate::SubDay
Subtract the specified number of days.
[ public ]
Void SubDay(
    UInt16 param   // number of days
);

Reference

SFXDate::AddDay | SFXDate::Sub | SFXDate::SubHour | SFXDate::SubMinute | SFXDate::SubMonth | SFXDate::SubSecond | SFXDate::SubYear


SFXDate::SubHour
Subtract the specified number of hours.
[ public ]
Void SubHour(
    UInt16 param   // number of hours
);

Reference

SFXDate::AddHour | SFXDate::Sub | SFXDate::SubDay | SFXDate::SubMinute | SFXDate::SubMonth | SFXDate::SubSecond | SFXDate::SubYear


SFXDate::SubMinute
Subtract the specified number of minutes.
[ public ]
Void SubMinute(
    UInt16 param   // number of minutes
);

Reference

SFXDate::AddMinute | SFXDate::Sub | SFXDate::SubDay | SFXDate::SubHour | SFXDate::SubMonth | SFXDate::SubSecond | SFXDate::SubYear


SFXDate::SubMonth
Subtract the specified number of months.
[ public ]
Void SubMonth(
    UInt16 param   // number of months
);

Reference

SFXDate::AddMonth | SFXDate::Sub | SFXDate::SubDay | SFXDate::SubHour | SFXDate::SubMinute | SFXDate::SubSecond | SFXDate::SubYear


SFXDate::SubSecond
Subtract the specified number of seconds.
[ public ]
Void SubSecond(
    UInt16 param   // number of seconds
);

Reference

SFXDate::AddSecond | SFXDate::Sub | SFXDate::SubDay | SFXDate::SubHour | SFXDate::SubMinute | SFXDate::SubMonth | SFXDate::SubYear


SFXDate::SubYear
Subtract the specified number of years.
[ public ]
Void SubYear(
    UInt16 param   // number of years
);

Reference

SFXDate::AddYear | SFXDate::Sub | SFXDate::SubDay | SFXDate::SubHour | SFXDate::SubMinute | SFXDate::SubMonth | SFXDate::SubSecond


SFXDate::ZeroInstance
Get the instance that represents 0.
[ public, static ]
SFXDateConstRef ZeroInstance(Void);

Description

The SFXDate::ZeroInstance function is the same as the constructor of SFXDate(0), but the SFXDate::ZeroInstance function is much faster.

Reference

SFXDate::SFXDate


SFXDate::operator=
Assign a date.
[ public ]
SFXDateRef operator=(
    SFXDateConstRef param   // date to assign
);

Reference

SFXDate::Set | operator== | operator> | operator>= | operator< | operator<= | operator!=


operator==
Check the == (equality) relation.
[ public, friend ]
Bool operator==(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If equal: true
  • Otherwise: false

Reference

SFXDate::operator= | operator> | operator>= | operator< | operator<= | operator!=


operator>=
Check the >= relation.
[ public, friend ]
Bool operator>=(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If left date equals or is after right date: true
  • Otherwise: false

Reference

SFXDate::operator= | operator== | operator> | operator< | operator<= | operator!= |


operator>
Check the > relation.
[ public, friend ]
Bool operator>(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If left date is after right date: true
  • Otherwise: false

Reference

SFXDate::operator= | operator== | operator>= | operator< | operator<= | operator!=


operator<=
Check the <= relation.
[ public, friend ]
Bool operator<=(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If left date equals or is before right date: true
  • Otherwise: false

Reference

SFXDate::operator= | operator== | operator> | operator>= | operator< | operator!=


operator<
Check the < relation.
[ public, friend ]
Bool operator<(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If left date is before right date: true
  • Otherwise: false

Reference

SFXDate::operator= | operator== | operator> | operator>= | operator<= | operator!=


SFXDate::operator-=
Subtract the specified number of seconds.
[ public ]
SFXDateRef operator-=(
    SFXDateDurationConstRef param   // number of seconds to subtract
);

Reference

SFXDate::Sub | operator-


operator-
Subtract the specified number of seconds.
[ public, friend ]
SFXDate operator-(
    SFXDateConstRef left            // date to be subtracted from
    SFXDateDurationConstRef right   // date duration to subtract (SFXDateDuration)
);
[ public, friend ]
SFXDateDuration operator-(
    SFXDateConstRef left    // date to be subtracted from
    SFXDateConstRef right   // date/time to subtract (SFXDate)
);

Description

The second argument of the SFXDate type is considered to be an elapsed time in seconds since January 6, 1980 00:00:00, and is subtracted.

Reference

SFXDateDuration | SFXDate::operator-= | operator+ | SFXDate::operator+= | SFXDate::Sub


operator!=
Check the "!=" relation.
[ public, friend ]
Bool operator!=(
    SFXDateConstRef left    // date to be compared
    SFXDateConstRef right   // date to compare with
);

Return value

  • If not equal: true
  • Otherwise: false

Reference

SFXDate::operator= | operator== | operator> | operator>= | operator< | operator<=


SFXDate::operator+=
Add the specified date duration.
[ public ]
SFXDateRef operator+=(
    SFXDateDurationConstRef param   // date duration
);

Reference

SFXDateDuration | operator- | SFXDate::operator-= | operator+


operator+
Add the specified date duration.
[ public, friend ]
SFXDate operator+(
    SFXDateConstRef left            // date
    SFXDateDurationConstRef right   // date duration to add
);

Reference

SFXDateDuration | operator- | SFXDate::operator-= | SFXDate::operator+=


SFXDate::DayOfWeekEnum
Constants that represent days of the week.
enum DayOfWeekEnum {
  DAYOFWEEK_MONDAY = 0,
  DAYOFWEEK_TUESDAY,
  DAYOFWEEK_WEDNESDAY,
  DAYOFWEEK_THURSDAY,
  DAYOFWEEK_FRIDAY,
  DAYOFWEEK_SATURDAY,
  DAYOFWEEK_SUNDAY
};

Description

Mainly used by SFXDate::GetDayOfWeek function.

Meaning of the constant is as follows:

Constant (value) Meaning
DAYOFWEEK_MONDAY (0) Monday
DAYOFWEEK_TUESDAY (1) Tuesday
DAYOFWEEK_WEDNESDAY (2) Wednesday
DAYOFWEEK_THURSDAY (3) Thursday
DAYOFWEEK_FRIDAY (4) Friday
DAYOFWEEK_SATURDAY (5) Saturday
DAYOFWEEK_SUNDAY (6) Sunday

Reference

SFXDate::GetDayOfWeek