DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
discord_core_api::time_stamp Class Reference

A class that extends time_stamp_base to provide additional functionality. More...

#include <Base.hpp>

Inheritance diagram for discord_core_api::time_stamp:
[legend]

Public Member Functions

 operator jsonifier::string () const
 Conversion operator to convert time_stamp to jsonifier::string. More...
 
 operator uint64_t () const
 Conversion operator to convert time_stamp to int64_t. More...
 
time_stampoperator= (jsonifier::string_view valueNew)
 Move assignment operator to move a string value into time_stamp. More...
 
time_stampoperator= (uint64_t valueNew)
 Assignment operator to assign a uint64_t value to time_stamp. More...
 
 time_stamp ()=default
 Default constructor for time_stamp.
 
 time_stamp (jsonifier::string_view valueNew)
 Move constructor to create a time_stamp instance by moving a string value. More...
 
 time_stamp (uint64_t valueNew)
 Constructor to create a time_stamp instance from a uint64_t value. More...
 
- Public Member Functions inherited from discord_core_api::time_stamp_base< time_stamp >
bool hasTimeElapsed (int64_t days, int64_t hours, int64_t minutes) const
 Checks if a certain time duration has elapsed. More...
 
bool operator== (jsonifier::string_view other) const
 Checks if the time stamp is equal to a string representation. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from discord_core_api::time_stamp_base< time_stamp >
static jsonifier::string convertMsToDurationString (uint64_t durationInMs)
 Converts milliseconds into a human-readable duration string. More...
 
static jsonifier::string convertToCurrentISO8601TimeStamp (time_format timeFormat)
 Converts the current time into an iso8601 time stamp. More...
 
static jsonifier::string convertToFutureISO8601TimeStamp (uint64_t minutesToAdd, uint64_t hoursToAdd, uint64_t daysToAdd, uint64_t monthsToAdd, uint64_t yearsToAdd, time_format timeFormat)
 Converts given time values into a future iso8601 time stamp. More...
 
static jsonifier::string getISO8601TimeStamp (time_format timeFormat, uint64_t inputTime)
 Gets an iso8601 time stamp string based on the provided time format. More...
 
static uint64_t getTimeSinceEpoch (uint64_t year, uint64_t month, uint64_t day, uint64_t hour, uint64_t minute, uint64_t second)
 Gets the time since the unix epoch for the specified date and time. More...
 

Constructor & Destructor Documentation

◆ time_stamp() [1/2]

discord_core_api::time_stamp::time_stamp ( jsonifier::string_view  valueNew)
inline
Parameters
valueNewthe string value to move.

Definition at line 635 of file Base.hpp.

◆ time_stamp() [2/2]

discord_core_api::time_stamp::time_stamp ( uint64_t  valueNew)
inline
Parameters
valueNewthe uint64_t value to create the instance from.

Definition at line 649 of file Base.hpp.

Member Function Documentation

◆ operator jsonifier::string()

discord_core_api::time_stamp::operator jsonifier::string ( ) const
inline
Returns
the jsonifier::string value represented by the time_stamp instance.

Definition at line 661 of file Base.hpp.

Here is the call graph for this function:

◆ operator uint64_t()

discord_core_api::time_stamp::operator uint64_t ( ) const
inline
Returns
the int64_t value represented by the time_stamp instance.

Definition at line 655 of file Base.hpp.

◆ operator=() [1/2]

time_stamp & discord_core_api::time_stamp::operator= ( jsonifier::string_view  valueNew)
inline
Parameters
valueNewthe string value to move.
Returns
reference to the modified time_stamp instance.

Definition at line 628 of file Base.hpp.

Here is the call graph for this function:

◆ operator=() [2/2]

time_stamp & discord_core_api::time_stamp::operator= ( uint64_t  valueNew)
inline
Parameters
valueNewthe new uint64_t value to assign.
Returns
reference to the modified time_stamp instance.

Definition at line 642 of file Base.hpp.


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