Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FDateTime Struct Reference

#include <DateTime.h>

+ Collaboration diagram for FDateTime:

Public Member Functions

 FDateTime ()
 
 FDateTime (int64 InTicks)
 
 FDateTime (int32 Year, int32 Month, int32 Day, int32 Hour=0, int32 Minute=0, int32 Second=0, int32 Millisecond=0)
 
FDateTime operator+ (const FTimespan &Other) const
 
FDateTimeoperator+= (const FTimespan &Other)
 
FDateTime operator+ (const FDateTime &Other)
 
FTimespan operator- (const FDateTime &Other) const
 
FDateTime operator- (const FTimespan &Other) const
 
FDateTimeoperator-= (const FTimespan &Other)
 
bool operator== (const FDateTime &Other) const
 
bool operator!= (const FDateTime &Other) const
 
bool operator> (const FDateTime &Other) const
 
bool operator>= (const FDateTime &Other) const
 
bool operator< (const FDateTime &Other) const
 
bool operator<= (const FDateTime &Other) const
 
bool ExportTextItem (FString &ValueStr, FDateTime const &DefaultValue, UObject *Parent, int32 PortFlags, UObject *ExportRootScope) const
 
FDateTime GetDate () const
 
void GetDate (int32 &OutYear, int32 &OutMonth, int32 &OutDay) const
 
int32 GetDay () const
 
EDayOfWeek GetDayOfWeek () const
 
int32 GetDayOfYear () const
 
int32 GetHour () const
 
int32 GetHour12 () const
 
double GetJulianDay () const
 
double GetModifiedJulianDay () const
 
int32 GetMillisecond () const
 
int32 GetMinute () const
 
int32 GetMonth () const
 
EMonthOfYear GetMonthOfYear () const
 
int32 GetSecond () const
 
int64 GetTicks () const
 
FTimespan GetTimeOfDay () const
 
int32 GetYear () const
 
bool ImportTextItem (const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText)
 
bool IsAfternoon () const
 
bool IsMorning () const
 
bool Serialize (FArchive &Ar)
 
bool NetSerialize (FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)
 
FString ToHttpDate () const
 
FString ToIso8601 () const
 
FString ToString () const
 
FString ToString (const TCHAR *Format) const
 
void ToString (const TCHAR *Format, FStringBuilderBase &Result) const
 
FString ToFormattedString (const TCHAR *Format) const
 
int64 ToUnixTimestamp () const
 

Static Public Member Functions

static int32 DaysInMonth (int32 Year, int32 Month)
 
static int32 DaysInYear (int32 Year)
 
static FDateTime FromJulianDay (double JulianDay)
 
static FDateTime FromUnixTimestamp (int64 UnixTime)
 
static bool IsLeapYear (int32 Year)
 
static FDateTime MaxValue ()
 
static FDateTime MinValue ()
 
static FDateTime Now ()
 
static bool Parse (const FString &DateTimeString, FDateTime &OutDateTime)
 
static bool ParseHttpDate (const FString &HttpDate, FDateTime &OutDateTime)
 
static bool ParseIso8601 (const TCHAR *DateTimeString, FDateTime &OutDateTime)
 
static FDateTime Today ()
 
static FDateTime UtcNow ()
 
static bool Validate (int32 Year, int32 Month, int32 Day, int32 Hour, int32 Minute, int32 Second, int32 Millisecond)
 

Static Protected Attributes

static const int32 DaysPerMonth []
 
static const int32 DaysToMonth []
 
static const TCHAR * ShortDayNames []
 
static const TCHAR * LongDayNames []
 
static const TCHAR * ShortMonthNames []
 
static const TCHAR * LongMonthNames []
 

Private Attributes

int64 Ticks
 

Friends

struct Z_Construct_UScriptStruct_FDateTime_Statics
 
FArchiveoperator<< (FArchive &Ar, FDateTime &DateTime)
 
void operator<< (FStructuredArchive::FSlot Slot, FDateTime &DateTime)
 
uint32 GetTypeHash (const FDateTime &DateTime)
 

Detailed Description

Implements a date and time.

Values of this type represent dates and times between Midnight 00:00:00, January 1, 0001 and Midnight 23:59:59.9999999, December 31, 9999 in the Gregorian calendar. Internally, the time values are stored in ticks of 0.1 microseconds (= 100 nanoseconds) since January 1, 0001.

To retrieve the current local date and time, use the FDateTime.Now() method. To retrieve the current UTC time, use the FDateTime.UtcNow() method instead.

This class also provides methods to convert dates and times from and to string representations, calculate the number of days in a given month and year, check for leap years and determine the time of day, day of week and month of year of a given date and time.

The companion struct FTimespan is provided for enabling date and time based arithmetic, such as calculating the difference between two dates or adding a certain amount of time to a given date.

Ranges of dates and times can be represented by the FDateRange class.

See also
FDateRange
FTimespan

Definition at line 75 of file DateTime.h.

Constructor & Destructor Documentation

◆ FDateTime() [1/3]

FDateTime::FDateTime ( )
inline

Default constructor (zero initialization).

Definition at line 80 of file DateTime.h.

◆ FDateTime() [2/3]

FDateTime::FDateTime ( int64 InTicks)
inline

Creates and initializes a new instance with the specified number of ticks.

Parameters
InTicksThe ticks representing the date and time.

Definition at line 89 of file DateTime.h.

+ Here is the caller graph for this function:

◆ FDateTime() [3/3]

FDateTime::FDateTime ( int32 Year,
int32 Month,
int32 Day,
int32 Hour = 0,
int32 Minute = 0,
int32 Second = 0,
int32 Millisecond = 0 )

Creates and initializes a new instance with the specified year, month, day, hour, minute, second and millisecond.

Parameters
YearThe year.
MonthThe month.
DayThe day.
HourThe hour (optional).
MinuteThe minute (optional).
SecondThe second (optional).
MillisecondThe millisecond (optional).
+ Here is the caller graph for this function:

Member Function Documentation

◆ DaysInMonth()

static int32 FDateTime::DaysInMonth ( int32 Year,
int32 Month )
static

Gets the number of days in the year and month.

Parameters
YearThe year.
MonthThe month.
Returns
The number of days
See also
DaysInYear

◆ DaysInYear()

static int32 FDateTime::DaysInYear ( int32 Year)
static

Gets the number of days in the given year.

Parameters
YearThe year.
Returns
The number of days.
See also
DaysInMonth

◆ ExportTextItem()

bool FDateTime::ExportTextItem ( FString & ValueStr,
FDateTime const & DefaultValue,
UObject * Parent,
int32 PortFlags,
UObject * ExportRootScope ) const

Exports the date and time value to a string.

Parameters
ValueStrWill hold the string value.
DefaultValueThe default value.
ParentNot used.
PortFlagsNot used.
ExportRootScopeNot used.
Returns
true on success, false otherwise.
See also
ImportTextItem

◆ FromJulianDay()

static FDateTime FDateTime::FromJulianDay ( double JulianDay)
inlinestatic

Returns the proleptic Gregorian date for the given Julian Day.

Parameters
JulianDayThe Julian Day.
Returns
Gregorian date and time.
See also
GetJulianDay

Definition at line 597 of file DateTime.h.

+ Here is the call graph for this function:

◆ FromUnixTimestamp()

static FDateTime FDateTime::FromUnixTimestamp ( int64 UnixTime)
inlinestatic

Returns the date from Unix time (seconds from midnight 1970-01-01)

Parameters
UnixTimeUnix time (seconds from midnight 1970-01-01)
Returns
Gregorian date and time.
See also
ToUnixTimestamp

Definition at line 609 of file DateTime.h.

+ Here is the call graph for this function:

◆ GetDate() [1/2]

FDateTime FDateTime::GetDate ( ) const
inline

Gets the date part of this date.

The time part is truncated and becomes 00:00:00.000.

Returns
A FDateTime object containing the date.

Definition at line 261 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDate() [2/2]

void FDateTime::GetDate ( int32 & OutYear,
int32 & OutMonth,
int32 & OutDay ) const

Gets the date components of this date.

Parameters
OutYearWill contain the year.
OutMonthWill contain the number of the month (1-12).
OutDayWill contain the number of the day (1-31).

◆ GetDay()

int32 FDateTime::GetDay ( ) const

Gets this date's day part (1 to 31).

Returns
Day of the month.
See also
GetHour, GetHour12, GetMillisecond, GetMinute, GetMonth, GetSecond, GetYear

◆ GetDayOfWeek()

EDayOfWeek FDateTime::GetDayOfWeek ( ) const

Calculates this date's day of the week (Sunday - Saturday).

Returns
The week day.
See also
GetDayOfYear, GetMonthOfYear, GetTimeOfDay

◆ GetDayOfYear()

int32 FDateTime::GetDayOfYear ( ) const

Gets this date's day of the year.

Returns
The day of year.
See also
GetDayOfWeek, GetMonthOfYear, GetTimeOfDay

◆ GetHour()

int32 FDateTime::GetHour ( ) const
inline

Gets this date's hour part in 24-hour clock format (0 to 23).

Returns
The hour.
See also
GetDay, GetDayOfWeek, GetDayOfYear, GetHour12, GetMillisecond, GetMinute, GetMonth, GetSecond, GetYear

Definition at line 305 of file DateTime.h.

+ Here is the caller graph for this function:

◆ GetHour12()

int32 FDateTime::GetHour12 ( ) const

Gets this date's hour part in 12-hour clock format (1 to 12).

Returns
The hour in AM/PM format.
See also
GetDay, GetHour, GetMillisecond, GetMinute, GetMonth, GetSecond, GetYear

◆ GetJulianDay()

double FDateTime::GetJulianDay ( ) const
inline

Returns the Julian Day for this date.

The Julian Day is the number of days since the inception of the Julian calendar at noon on Monday, January 1, 4713 B.C.E. The minimum Julian Day that can be represented in FDateTime is 1721425.5, which corresponds to Monday, January 1, 0001 in the Gregorian calendar.

Returns
Julian Day.
See also
FromJulianDay, GetModifiedJulianDay

Definition at line 328 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMillisecond()

int32 FDateTime::GetMillisecond ( ) const
inline

Gets this date's millisecond part (0 to 999).

Returns
The millisecond.
See also
GetDay, GetHour, GetHour12, GetMinute, GetMonth, GetSecond, GetYear

Definition at line 353 of file DateTime.h.

◆ GetMinute()

int32 FDateTime::GetMinute ( ) const
inline

Gets this date's minute part (0 to 59).

Returns
The minute.
See also
GetDay, GetHour, GetHour12, GetMillisecond, GetMonth, GetSecond, GetYear

Definition at line 364 of file DateTime.h.

◆ GetModifiedJulianDay()

double FDateTime::GetModifiedJulianDay ( ) const
inline

Returns the Modified Julian day.

The Modified Julian Day is calculated by subtracting 2400000.5, which corresponds to midnight UTC on November 17, 1858 in the Gregorian calendar.

Returns
Modified Julian Day
See also
GetJulianDay

Definition at line 342 of file DateTime.h.

+ Here is the call graph for this function:

◆ GetMonth()

int32 FDateTime::GetMonth ( ) const

Gets this date's the month part (1 to 12).

Returns
The month.
See also
GetDay, GetHour, GetHour12, GetMillisecond, GetMinute, GetSecond, GetYear
+ Here is the caller graph for this function:

◆ GetMonthOfYear()

EMonthOfYear FDateTime::GetMonthOfYear ( ) const
inline

Gets the date's month of the year (January to December).

Returns
Month of year.
See also
GetDayOfWeek, GetDayOfYear, GetTimeOfDay

Definition at line 383 of file DateTime.h.

+ Here is the call graph for this function:

◆ GetSecond()

int32 FDateTime::GetSecond ( ) const
inline

Gets this date's second part.

Returns
The second.
See also
GetDay, GetHour, GetHour12, GetMillisecond, GetMinute, GetMonth, GetYear

Definition at line 394 of file DateTime.h.

◆ GetTicks()

int64 FDateTime::GetTicks ( ) const
inline

Gets this date's representation as number of ticks.

Returns
Number of ticks since midnight, January 1, 0001.

Definition at line 404 of file DateTime.h.

◆ GetTimeOfDay()

FTimespan FDateTime::GetTimeOfDay ( ) const
inline

Gets the time elapsed since midnight of this date.

Returns
Time of day since midnight.
See also
GetDayOfWeek, GetDayOfYear, GetMonthOfYear

Definition at line 415 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetYear()

int32 FDateTime::GetYear ( ) const

Gets this date's year part.

Returns
The year.
See also
GetDay, GetHour, GetHour12, GetMillisecond, GetMinute, GetMonth, GetSecond

◆ ImportTextItem()

bool FDateTime::ImportTextItem ( const TCHAR *& Buffer,
int32 PortFlags,
UObject * Parent,
FOutputDevice * ErrorText )

Imports a date and time value from a text buffer.

Parameters
BufferThe text buffer to import from.
PortFlagsNot used.
ParentNot used.
ErrorTextThe output device for error logging.
Returns
true on success, false otherwise.
See also
ExportTextItem

◆ IsAfternoon()

bool FDateTime::IsAfternoon ( ) const
inline

Gets whether this date's time is in the afternoon.

Returns
true if it is in the afternoon, false otherwise.
See also
IsMorning

Definition at line 446 of file DateTime.h.

+ Here is the call graph for this function:

◆ IsLeapYear()

static bool FDateTime::IsLeapYear ( int32 Year)
static

Checks whether the given year is a leap year.

A leap year is a year containing one additional day in order to keep the calendar synchronized with the astronomical year. All years divisible by 4, but not divisible by 100 - except if they are also divisible by 400 - are leap years.

Parameters
YearThe year to check.
Returns
true if the year is a leap year, false otherwise.

◆ IsMorning()

bool FDateTime::IsMorning ( ) const
inline

Gets whether this date's time is in the morning.

Returns
true if it is in the morning, false otherwise.
See also
IsAfternoon

Definition at line 457 of file DateTime.h.

+ Here is the call graph for this function:

◆ MaxValue()

static FDateTime FDateTime::MaxValue ( )
inlinestatic

Returns the maximum date value.

The maximum date value is December 31, 9999, 23:59:59.9999999.

See also
MinValue

Definition at line 633 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MinValue()

static FDateTime FDateTime::MinValue ( )
inlinestatic

Returns the minimum date value.

The minimum date value is January 1, 0001, 00:00:00.0.

See also
MaxValue

Definition at line 645 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NetSerialize()

bool FDateTime::NetSerialize ( FArchive & Ar,
class UPackageMap * Map,
bool & bOutSuccess )

Serializes this date and time for network transmission

◆ Now()

static FDateTime FDateTime::Now ( )
static

Gets the local date and time on this computer.

This method takes into account the local computer's time zone and daylight saving settings. For time zone independent time comparisons, and when comparing times between different computers, please use UtcNow() instead.

Returns
Current date and time.
See also
Today, UtcNow
+ Here is the caller graph for this function:

◆ operator!=()

bool FDateTime::operator!= ( const FDateTime & Other) const
inline

Compares this date with the given date for inequality.

Parameters
OtherThe date to compare with.
Returns
true if the dates are not equal, false otherwise.

Definition at line 190 of file DateTime.h.

◆ operator+() [1/2]

FDateTime FDateTime::operator+ ( const FDateTime & Other)
inline

Definition at line 133 of file DateTime.h.

+ Here is the call graph for this function:

◆ operator+() [2/2]

FDateTime FDateTime::operator+ ( const FTimespan & Other) const
inline

Returns result of adding the given time span to this date.

Returns
A date whose value is the sum of this date and the given time span.
See also
FTimespan

Definition at line 114 of file DateTime.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator+=()

FDateTime & FDateTime::operator+= ( const FTimespan & Other)
inline

Adds the given time span to this date.

Returns
This date.
See also
FTimespan

Definition at line 125 of file DateTime.h.

+ Here is the call graph for this function:

◆ operator-() [1/2]

FTimespan FDateTime::operator- ( const FDateTime & Other) const
inline

Returns time span between this date and the given date.

Returns
A time span whose value is the difference of this date and the given date.
See also
FTimespan

Definition at line 144 of file DateTime.h.

+ Here is the call graph for this function:

◆ operator-() [2/2]

FDateTime FDateTime::operator- ( const FTimespan & Other) const
inline

Returns result of subtracting the given time span from this date.

Returns
A date whose value is the difference of this date and the given time span.
See also
FTimespan

Definition at line 155 of file DateTime.h.

+ Here is the call graph for this function:

◆ operator-=()

FDateTime & FDateTime::operator-= ( const FTimespan & Other)
inline

Subtracts the given time span from this date.

Returns
This date.
See also
FTimespan

Definition at line 166 of file DateTime.h.

+ Here is the call graph for this function:

◆ operator<()

bool FDateTime::operator< ( const FDateTime & Other) const
inline

Checks whether this date is less than the given date.

Parameters
OtherThe date to compare with.
Returns
true if this date is less, false otherwise.

Definition at line 223 of file DateTime.h.

◆ operator<=()

bool FDateTime::operator<= ( const FDateTime & Other) const
inline

Checks whether this date is less than or equal to the given date.

Parameters
OtherThe date to compare with.
Returns
true if this date is less or equal, false otherwise.

Definition at line 234 of file DateTime.h.

◆ operator==()

bool FDateTime::operator== ( const FDateTime & Other) const
inline

Compares this date with the given date for equality.

Parameters
OtherThe date to compare with.
Returns
true if the dates are equal, false otherwise.

Definition at line 179 of file DateTime.h.

◆ operator>()

bool FDateTime::operator> ( const FDateTime & Other) const
inline

Checks whether this date is greater than the given date.

Parameters
OtherThe date to compare with.
Returns
true if this date is greater, false otherwise.

Definition at line 201 of file DateTime.h.

◆ operator>=()

bool FDateTime::operator>= ( const FDateTime & Other) const
inline

Checks whether this date is greater than or equal to the date span.

Parameters
OtherThe date to compare with.
Returns
true if this date is greater or equal, false otherwise.

Definition at line 212 of file DateTime.h.

+ Here is the caller graph for this function:

◆ Parse()

static bool FDateTime::Parse ( const FString & DateTimeString,
FDateTime & OutDateTime )
static

Converts a string to a date and time.

Currently, the string must be in the format written by either FDateTime.ToString() or FTimeStamp.TimestampToFString(). Other formats are not supported at this time.

Parameters
DateTimeStringThe string to convert.
OutDateTimeWill contain the parsed date and time.
Returns
true if the string was converted successfully, false otherwise.
See also
ParseHttpDate, ParseIso8601, ToString

◆ ParseHttpDate()

static bool FDateTime::ParseHttpDate ( const FString & HttpDate,
FDateTime & OutDateTime )
static

Parses a date string in HTTP-date format (rfc1123-date | rfc850-date | asctime-date) https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1

HTTP-date = rfc1123-date | rfc850-date | asctime-date rfc1123-date = wkday "," SP date1 SP time SP "GMT" rfc850-date = weekday "," SP date2 SP time SP "GMT" asctime-date = wkday SP date3 SP time SP 4DIGIT date1 = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982) date2 = 2DIGIT "-" month "-" 2DIGIT ; day-month-year (e.g., 02-Jun-82) date3 = month SP (2DIGIT | (SP 1DIGIT)) ; month day (e.g., Jun 2) time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59 wkday = "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | "Sun" weekday = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec"

Parameters
HttpDateThe string to be parsed
OutDateTimeFDateTime object (assumes UTC) corresponding to the input string.
Returns
true if the string was converted successfully, false otherwise.
See also
Parse, ToHttpDate, ParseIso8601

◆ ParseIso8601()

static bool FDateTime::ParseIso8601 ( const TCHAR * DateTimeString,
FDateTime & OutDateTime )
static

Parses a date string in ISO-8601 format.

Parameters
DateTimeStringThe string to be parsed
OutDateTimeFDateTime object (in UTC) corresponding to the input string (which may have been in any timezone).
Returns
true if the string was converted successfully, false otherwise.
See also
Parse, ParseHttpDate, ToIso8601

◆ Serialize()

bool FDateTime::Serialize ( FArchive & Ar)

Serializes this date and time from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
Returns
true on success, false otherwise.

◆ Today()

static FDateTime FDateTime::Today ( )
inlinestatic

Gets the local date on this computer.

The time component is set to 00:00:00

Returns
Current date.
See also
Now, UtcNow

Definition at line 716 of file DateTime.h.

+ Here is the call graph for this function:

◆ ToFormattedString()

FString FDateTime::ToFormattedString ( const TCHAR * Format) const

Returns the string representation of this date.

Uses strftime-like syntax: a - Weekday, eg) Sun A - Weekday, eg) Sunday w - Weekday, 0-6 (Sunday is 0) y - Year, YY Y - Year, YYYY b - Month, eg) Jan B - Month, eg) January m - Month, 01-12 d - Day, 01-31 e - Day, 1-31 l - 12h Hour, 1-12 I - 12h Hour, 01-12 H - 24h Hour, 00-23 M - Minute, 00-59 S - Second, 00-60 p - AM or PM P - am or PM j - Day of the Year, 001-366

Parameters
FormatThe format of the returned string.
Returns
String representation.

◆ ToHttpDate()

FString FDateTime::ToHttpDate ( ) const

Returns the RFC 1123 string representation of the FDateTime.

The resulting string assumes that the FDateTime is in UTC.

Returns
String representation.
See also
ParseHttpDate, ToIso8601, ToString

◆ ToIso8601()

FString FDateTime::ToIso8601 ( ) const

Returns the ISO-8601 string representation of the FDateTime.

The resulting string assumes that the FDateTime is in UTC.

Returns
String representation.
See also
ParseIso8601, ToHttpDate, ToString

◆ ToString() [1/3]

FString FDateTime::ToString ( ) const

Returns the string representation of this date using a default format.

The returned string has the following format: yyyy.mm.dd-hh.mm.ss

Returns
String representation.
See also
Parse, ToIso8601

◆ ToString() [2/3]

FString FDateTime::ToString ( const TCHAR * Format) const

Returns the string representation of this date.

ToString uses a non-standard format syntax (see below). If you need strftime-like syntax, then use ToFormattedString: a - am or pm A - AM or PM d - Day, 01-31 D - Day of the Year, 001-366 m - Month, 01-12 y - Year, YY Y - Year, YYYY h - 12h Hour, 01-12 H - 24h Hour, 00-23 M - Minute, 00-59 S - Second, 00-60 s - Millisecond, 000-999

Parameters
FormatThe format of the returned string.
Returns
String representation.
See also
Parse, ToIso8601

◆ ToString() [3/3]

void FDateTime::ToString ( const TCHAR * Format,
FStringBuilderBase & Result ) const

◆ ToUnixTimestamp()

int64 FDateTime::ToUnixTimestamp ( ) const
inline

Returns this date as the number of seconds since the Unix Epoch (January 1st of 1970).

Returns
Time of day.
See also
FromUnixTimestamp

Definition at line 564 of file DateTime.h.

+ Here is the call graph for this function:

◆ UtcNow()

static FDateTime FDateTime::UtcNow ( )
static

Gets the UTC date and time on this computer.

This method returns the Coordinated Universal Time (UTC), which does not take the local computer's time zone and daylight savings settings into account. It should be used when comparing dates and times that should be independent of the user's locale. To get the date and time in the current locale, use Now() instead.

This method will use an estimate if USE_ESTIMATED_UTCNOW is 1. To calculate the estimate it will initialize a base reference time and keep track of the offset from that time with FPlatformTime::Cycles64().
This is appropriate for platforms whose implementations of FPlatformTime::UtcTime are expensive. To use, enable bUseEstimatedUtcNow in TargetRules. The rebase time is stored in time.EstimatedUtcNowRebaseTimeSeconds (default setting is 600 seconds).

Returns
Current date and time.
See also
Now
+ Here is the caller graph for this function:

◆ Validate()

static bool FDateTime::Validate ( int32 Year,
int32 Month,
int32 Day,
int32 Hour,
int32 Minute,
int32 Second,
int32 Millisecond )
static

Validates the given components of a date and time value.

The allow ranges for the components are: Year: 1 - 9999 Month: 1 - 12 Day: 1 - DaysInMonth(Month) Hour: 0 - 23 Minute: 0 - 59 Second: 0 - 59 Millisecond: 0 - 999

Returns
true if the components are valid, false otherwise.

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FDateTime & DateTime)
friend

Gets the hash for the specified date and time.

Parameters
DateTimeThe date and time to get the hash for.
Returns
Hash value.

Definition at line 788 of file DateTime.h.

◆ operator<< [1/2]

FArchive & operator<< ( FArchive & Ar,
FDateTime & DateTime )
friend

Serializes the given date and time from or into the specified archive.

Parameters
ArThe archive to serialize from or into.
DateTimeThe date and time value to serialize.
Returns
The archive.

Definition at line 766 of file DateTime.h.

◆ operator<< [2/2]

void operator<< ( FStructuredArchive::FSlot Slot,
FDateTime & DateTime )
friend

Serializes the given date and time from or into the specified structured archive slot.

Parameters
SlotThe structured archive slot to serialize from or into.
DateTimeThe date and time value to serialize.

Definition at line 777 of file DateTime.h.

◆ Z_Construct_UScriptStruct_FDateTime_Statics

friend struct Z_Construct_UScriptStruct_FDateTime_Statics
friend

Definition at line 810 of file DateTime.h.

Member Data Documentation

◆ DaysPerMonth

const int32 FDateTime::DaysPerMonth[]
staticprotected

Holds the days per month in a non-leap year.

Definition at line 796 of file DateTime.h.

◆ DaysToMonth

const int32 FDateTime::DaysToMonth[]
staticprotected

Holds the cumulative days per month in a non-leap year.

Definition at line 799 of file DateTime.h.

◆ LongDayNames

const TCHAR* FDateTime::LongDayNames[]
staticprotected

Definition at line 803 of file DateTime.h.

◆ LongMonthNames

const TCHAR* FDateTime::LongMonthNames[]
staticprotected

Definition at line 807 of file DateTime.h.

◆ ShortDayNames

const TCHAR* FDateTime::ShortDayNames[]
staticprotected

Holds the long and short day names.

Definition at line 802 of file DateTime.h.

◆ ShortMonthNames

const TCHAR* FDateTime::ShortMonthNames[]
staticprotected

Holds the long and short month names.

Definition at line 806 of file DateTime.h.

◆ Ticks

int64 FDateTime::Ticks
private

Holds the ticks in 100 nanoseconds resolution since January 1, 0001 A.D.

Definition at line 815 of file DateTime.h.


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