Blame |
Last modification |
View Log
| Download
| RSS feed
/**************************************************************************//**
* \brief Date and time management library
* \author Copyright (C) 2011 Julien Le Sech - www.idreammicro.com
* \version 1.0
* \date 20090501
*
* This file is part of the iDreamMicro library.
*
* This library is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see http://www.gnu.org/licenses/
******************************************************************************/
/**************************************************************************//**
* \headerfile datetime.h
******************************************************************************/
#ifndef H__IDREAMMICRO__USEFUL__DATETIME__H
#define H__IDREAMMICRO__USEFUL__DATETIME__H
#ifdef _cplusplus
extern "C"{
#endif
/******************************************************************************
* Header file inclusions.
******************************************************************************/
#include <stdint.h>
/******************************************************************************
* Public types definitions.
******************************************************************************/
/**************************************************************************//**
* \enum datetime__meridiems
* \brief Time meridiems.
*
* \typedef datetime__meridiem_t
* \brief Time meridiem.
******************************************************************************/
typedef enum datetime__meridiems
{
DATETIME__MERIDIEM__AM = 0, /*!< Ante meridiem. */
DATETIME__MERIDIEM__PM = 1 /*!< Post meridiem. */
} datetime__meridiem_t;
/**************************************************************************//**
* \struct datetime__time
* \brief Time.
*
* \typedef datetime__time_t
* \brief Time.
******************************************************************************/
typedef struct datetime__time
{
uint8_t seconds; /*!< Seconds (0-59). */
uint8_t minutes; /*!< Minutes (0-59). */
uint8_t hours; /*!< Hours (1-12 or 0-23). */
datetime__meridiem_t meridiem; /*!< Meridiem (AM-PM). */
} datetime__time_t;
/**************************************************************************//**
* \struct datetime__date
* \brief Date.
*
* \typedef datetime__date_t
* \brief Date.
******************************************************************************/
typedef struct datetime__date
{
uint8_t day; /*!< Day (1-7). */
uint8_t date; /*!< Date (1-31). */
uint8_t month; /*!< Month (1-12). */
uint8_t year; /*!< Year (0-99). */
} datetime__date_t;
#ifdef _cplusplus
}
#endif
#endif /* H__IDREAMMICRO__USEFUL__DATETIME__H */