LocalTimeRK
Public Member Functions
LocalTimeIgnoreHMS Class Reference

This class can be passed to most functions that take a LocalTimeHMS to instead not set the HMS. More...

#include <LocalTimeRK.h>

Inheritance diagram for LocalTimeIgnoreHMS:
LocalTimeHMS

Public Member Functions

 LocalTimeIgnoreHMS ()
 Special version of LocalTimeHMS that does not set the HMS.
 
virtual String toString () const
 Returns a human readable version of this object. More...
 
- Public Member Functions inherited from LocalTimeHMS
 LocalTimeHMS ()
 Default constructor. Sets time to 00:00:00.
 
virtual ~LocalTimeHMS ()
 Destructor.
 
 LocalTimeHMS (const char *str)
 Constructs the object from a time string. More...
 
 LocalTimeHMS (const LocalTimeValue &value)
 Construct this HMS from a LocalTimeValue (which contains YMD and HMS) More...
 
void clear ()
 Sets the hour, minute, and second to 0.
 
void parse (const char *str)
 Parse a "H:MM:SS" string. More...
 
String toString () const
 Turns the parsed data into a normalized string of the form: "HH:MM:SS" (24-hour clock, with leading zeroes)
 
int toSeconds () const
 Convert hour minute second into a number of seconds (simple multiplication and addition)
 
void fromTimeInfo (const struct tm *pTimeInfo)
 Sets the hour, minute, and second fields from a struct tm.
 
void fromLocalTimeValue (const LocalTimeValue &value)
 Sets the HMS from a LocalTimeValue. More...
 
void toTimeInfo (struct tm *pTimeInfo) const
 Fill in the tm_hour, tm_min, and tm_sec fields of a struct tm from the values in this object. More...
 
void adjustTimeInfo (struct tm *pTimeInfo) const
 Adjust the values in a struct tm from the values in this object. More...
 
void fromJson (JSONValue jsonObj)
 Parses a JSON value of type string in HH:MM:SS format. More...
 
LocalTimeHMS & withHour (int hour)
 Sets this object to be the specified hour, with minute and second set to 0. More...
 
LocalTimeHMS & withHourMinute (int hour, int minute)
 Sets this object to be the specified hour and minute, with second set to 0. More...
 
int compareTo (const LocalTimeHMS &other) const
 Compare two LocalTimeHMS objects. More...
 
bool operator== (const LocalTimeHMS &other) const
 Returns true if this item is equal to other. Compares hour, minute, and second. More...
 
bool operator!= (const LocalTimeHMS &other) const
 Returns true if this item is not equal to other. More...
 
bool operator< (const LocalTimeHMS &other) const
 Returns true if this item is < other. More...
 
bool operator> (const LocalTimeHMS &other) const
 Returns true if this item is > other. More...
 
bool operator<= (const LocalTimeHMS &other) const
 Returns true if this item <= other. More...
 
bool operator>= (const LocalTimeHMS &other) const
 Returns true if this item is >= other. More...
 

Additional Inherited Members

- Data Fields inherited from LocalTimeHMS
int8_t hour = 0
 0-23 hour (could also be negative)
 
int8_t minute = 0
 0-59 minute
 
int8_t second = 0
 0-59 second
 
int8_t ignore = 0
 Special case.
 

Detailed Description

This class can be passed to most functions that take a LocalTimeHMS to instead not set the HMS.

Member Function Documentation

◆ toString()

virtual String LocalTimeIgnoreHMS::toString ( ) const
inlinevirtual

Returns a human readable version of this object.

Returns
String

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