Class DateTime
Helper class to conveniently handle date and time.
#include <DS3231M.h>
Public Functions
| Type | Name |
|---|---|
| DateTime (uint16_t y=0, uint8_t m=0, uint8_t d=0, uint8_t hh=0, uint8_t mm=0, uint8_t ss=0) Constructor of the DateTime class. |
|
| uint8_t | day () const Gets the day of the month. |
| uint8_t | dayOfTheWeek () const Calculates the day of the week. |
| uint8_t | hour () const Gets the hour. |
| uint8_t | minute () const Gets the minute. |
| uint8_t | month () const Gets the month. |
| uint8_t | second () const Gets the second. |
| uint16_t | year () const Gets the year. |
Protected Attributes
| Type | Name |
|---|---|
| uint8_t | d Day of the month. |
| uint8_t | hh Hours. |
| uint8_t | m Month. |
| uint8_t | mm Minutes. |
| uint8_t | ss Seconds. |
| uint16_t | y Year. |
Public Functions Documentation
function DateTime
Constructor of the DateTime class.
inline DateTime::DateTime (
uint16_t y=0,
uint8_t m=0,
uint8_t d=0,
uint8_t hh=0,
uint8_t mm=0,
uint8_t ss=0
)
Parameters:
yYearmMonthdDayhhHoursmmMinutesssSeconds
function day
Gets the day of the month.
Returns:
Day of the month.
function dayOfTheWeek
Calculates the day of the week.
Returns:
Day of the week (1 = Sunday, 2 = Monday, ..., 7 = Saturday).
function hour
Gets the hour.
Returns:
Hour.
function minute
Gets the minute.
Returns:
Minute.
function month
Gets the month.
Returns:
Month.
function second
Gets the second.
Returns:
Second.
function year
Gets the year.
Returns:
Year.
Protected Attributes Documentation
variable d
Day of the month.
variable hh
Hours.
variable m
Month.
variable mm
Minutes.
variable ss
Seconds.
variable y
Year.
The documentation for this class was generated from the following file firmware/DS3231M.h