FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxDateTime Class Reference

#include <fbxpropertytypes.h>

Class Description

FBX SDK date&time class.

Property used to store date and time information; not related to a FbxTime, which is used for film-related operations. The date and time property does not make any provisions for UTC, GMT or local zones; this is entirely up to client code to know what they are dealing with.

Definition at line 332 of file fbxpropertytypes.h.

Public Member Functions

void Clear ()
 Set the attributes to 0. More...
 
bool isValid () const
 Validates each field is within a normal range (month is 1-12, etc). More...
 

Static Public Member Functions

static FbxDateTime currentDateTimeGMT ()
 Get date&time from current date&time of GMT. More...
 

Constructors

 FbxDateTime ()
 Default constructor. Set attributes to 0. More...
 
 FbxDateTime (int pDay, int pMonth, int pYear, int pHour, int pMin, int pSec, int pMillisecond=0)
 Constructor. More...
 

Boolean operation

bool operator== (const FbxDateTime &pRHS) const
 Equivalence operator. More...
 
bool operator!= (const FbxDateTime &pRHS) const
 Non-equivalence operator. More...
 

Access

void setDate (int pDay, int pMonth, int pYear)
 Set the date. More...
 
void setTime (int pHour, int pMin, int pSec, int pMillisecond=0)
 Set the time. More...
 

Operation with string

FbxString toString () const
 Get the string format from this date&time. More...
 
bool fromString (const char *)
 Get date&time from the string format. More...
 

Constructor & Destructor Documentation

◆ FbxDateTime() [1/2]

Default constructor. Set attributes to 0.

◆ FbxDateTime() [2/2]

FbxDateTime ( int  pDay,
int  pMonth,
int  pYear,
int  pHour,
int  pMin,
int  pSec,
int  pMillisecond = 0 
)

Constructor.

Parameters
pDayDay
pMonthMonth
pYearYear
pHourHour
pMinMinute
pSecSecond
pMillisecondMillisecond
Remarks
If one or more argument is invalid, the object is reset to 0.

Member Function Documentation

◆ operator==()

bool operator== ( const FbxDateTime pRHS) const

Equivalence operator.

Parameters
pRHSThe date&time to be compared with this date&time.
Returns
True, if the two date&time are equal, false otherwise.

◆ operator!=()

bool operator!= ( const FbxDateTime pRHS) const

Non-equivalence operator.

Parameters
pRHSThe date&time to be compared with this date&time.
Returns
True, if the two date&time are not equal, false otherwise.

◆ Clear()

void Clear ( )

Set the attributes to 0.

◆ isValid()

bool isValid ( ) const

Validates each field is within a normal range (month is 1-12, etc).

Returns
True, if each field is within a normal range, false otherwise.

◆ setDate()

void setDate ( int  pDay,
int  pMonth,
int  pYear 
)

Set the date.

Parameters
pDayDay to be set.
pMonthMonth to be set.
pYearYear to be set.
Remarks
If one or more argument is invalid, the object is reset to 0.

◆ setTime()

void setTime ( int  pHour,
int  pMin,
int  pSec,
int  pMillisecond = 0 
)

Set the time.

Parameters
pHourHour to be set.
pMinMinute to be set.
pSecSecond to be set.
pMillisecondMillisecond to be set.
Remarks
If one or more argument is invalid, the object is reset to 0.

◆ toString()

FbxString toString ( ) const

Get the string format from this date&time.

Returns
The string format got from this date&time.

◆ fromString()

bool fromString ( const char *  )

Get date&time from the string format.

Returns
True, if get date&time from the string format successfully, false otherwise.
Remarks
! This will only work with the format returned by toString(); if the format is not the same will return 'false' and the content of this object will remain unchanged.

◆ currentDateTimeGMT()

static FbxDateTime currentDateTimeGMT ( )
static

Get date&time from current date&time of GMT.

Returns
The date&time equal to current date&time of GMT.

The documentation for this class was generated from the following file: