Important update:

- Add new DateTimeCore file
- Provides functions to get/set system date
- Create Date, Time and Date/Time string with custom separators
This commit is contained in:
Charl Wentzel
2017-03-03 18:00:44 +02:00
parent 47577e9f4c
commit 02b43fe6b8
3 changed files with 210 additions and 1 deletions

32
DateTimeCore.h Normal file
View File

@@ -0,0 +1,32 @@
/*
* DateTimeCore.h
*
* Created on: 3 Mar 2017
* Author: wentzelc
*/
#ifndef REDACORE_DATETIMECORE_H_
#define REDACORE_DATETIMECORE_H_
// redA Libraries
/* none */
// Standard C/C++ Libraries
#include <time.h>
//---------------------------------------------------------------------------
// Get and set System Date and Time
bool SetTime( unsigned char Hours, unsigned char Minutes, unsigned char Seconds );
bool GetTime( unsigned char &Hours, unsigned char &Minutes, unsigned char &Seconds );
bool SetDate( unsigned char Day, unsigned char Month, unsigned Year );
bool GetDate( unsigned char &Day, unsigned char &Month, unsigned &Year );
char const * GetDateStr( const char * DateSeparator = NULL );
char const * GetTimeStr( const char * TimeSeparator = NULL );
char const * GetDateTimeStr( const char * DateSeparator = NULL, const char * TimeSeparator = NULL );
//---------------------------------------------------------------------------
#endif /* REDACORE_DATETIMECORE_H_ */