Ating for MQL5
Loading...
Searching...
No Matches
TimeHelper Class Reference

A utility class for handling date and time operations. More...

Static Public Member Functions

static bool Sort (MqlDateTime &start, MqlDateTime &end)
 Sorts the start and end dates in ascending order.
 
static bool Sort (datetime &start, datetime &end)
 Sorts the start and end dates in ascending order.
 
static bool IsIn (MqlDateTime &date, MqlDateTime &start, MqlDateTime &end)
 Checks if a date is within a specified range.
 
static bool IsIn (datetime &date, datetime &start, datetime &end)
 Checks if a date is within a specified range.
 
static void UpdateDate (MqlDateTime &date, MqlDateTime &start, MqlDateTime &end)
 Updates the start and end dates to match the given date.
 
static void UpdateDate (datetime &date, datetime &start, datetime &end)
 Updates the start and end dates to match the given date.
 
static void UpdateDate (MqlDateTime &start, MqlDateTime &end)
 Updates the start and end dates to match the current time.
 
static void UpdateDate (datetime &start, datetime &end)
 Updates the start and end dates to match the current time.
 

Detailed Description

A utility class for handling date and time operations.

Member Function Documentation

◆ IsIn() [1/2]

bool TimeHelper::IsIn ( datetime & date,
datetime & start,
datetime & end )
static

Checks if a date is within a specified range.

Parameters
dateDate to check
startStart date of the range
endEnd date of the range
Returns
True if the date is within the range, false otherwise

◆ IsIn() [2/2]

bool TimeHelper::IsIn ( MqlDateTime & date,
MqlDateTime & start,
MqlDateTime & end )
static

Checks if a date is within a specified range.

Parameters
dateDate to check
startStart date of the range
endEnd date of the range
Returns
True if the date is within the range, false otherwise
+ Here is the caller graph for this function:

◆ Sort() [1/2]

bool TimeHelper::Sort ( datetime & start,
datetime & end )
static

Sorts the start and end dates in ascending order.

Parameters
startStart date to sort
endEnd date to sort
Returns
True if the dates were sorted, false if they are equal

◆ Sort() [2/2]

bool TimeHelper::Sort ( MqlDateTime & start,
MqlDateTime & end )
static

Sorts the start and end dates in ascending order.

Parameters
startStart date to sort
endEnd date to sort
Returns
True if the dates were sorted, false if they are equal
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateDate() [1/4]

void TimeHelper::UpdateDate ( datetime & date,
datetime & start,
datetime & end )
static

Updates the start and end dates to match the given date.

Parameters
dateSource date to copy from
startStart date to update
endEnd date to update

◆ UpdateDate() [2/4]

void TimeHelper::UpdateDate ( datetime & start,
datetime & end )
static

Updates the start and end dates to match the current time.

Parameters
startStart date to update
endEnd date to update

◆ UpdateDate() [3/4]

void TimeHelper::UpdateDate ( MqlDateTime & date,
MqlDateTime & start,
MqlDateTime & end )
static

Updates the start and end dates to match the given date.

Parameters
dateSource date to copy from
startStart date to update
endEnd date to update
+ Here is the caller graph for this function:

◆ UpdateDate() [4/4]

void TimeHelper::UpdateDate ( MqlDateTime & start,
MqlDateTime & end )
static

Updates the start and end dates to match the current time.

Parameters
startStart date to update
endEnd date to update

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