RAVE
rave_datetime.h File Reference

Object for managing date and time. More...

#include "rave_object.h"

Go to the source code of this file.

Typedefs

typedef struct _RaveDateTime_t RaveDateTime_t
 Defines a Rave date/time.
 

Functions

int RaveDateTime_setTime (RaveDateTime_t *dt, const char *value)
 Sets the nominal time.
 
const char * RaveDateTime_getTime (RaveDateTime_t *dt)
 Returns the nominal time.
 
int RaveDateTime_setDate (RaveDateTime_t *dt, const char *value)
 Sets the nominal date.
 
const char * RaveDateTime_getDate (RaveDateTime_t *dt)
 Returns the nominal date.
 
int RaveDateTime_compare (RaveDateTime_t *self, RaveDateTime_t *other)
 Compares self with another datetime object.
 

Variables

RaveCoreObjectType RaveDateTime_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Object for managing date and time.

This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-12-16

Typedef Documentation

◆ RaveDateTime_t

Defines a Rave date/time.

Function Documentation

◆ RaveDateTime_compare()

int RaveDateTime_compare ( RaveDateTime_t * self,
RaveDateTime_t * other )

Compares self with another datetime object.

If the datetime is equal, 0 is returned, if self is before other a negative value is returned and if self is after other a positive number is returned.

◆ RaveDateTime_getDate()

const char * RaveDateTime_getDate ( RaveDateTime_t * dt)

Returns the nominal date.

Parameters
[in]dt- self
Returns
the nominal time (or NULL if there is none)

◆ RaveDateTime_getTime()

const char * RaveDateTime_getTime ( RaveDateTime_t * dt)

Returns the nominal time.

Parameters
[in]dt- self
Returns
the nominal time (or NULL if there is none)

◆ RaveDateTime_setDate()

int RaveDateTime_setDate ( RaveDateTime_t * dt,
const char * value )

Sets the nominal date.

Parameters
[in]dt- self
[in]value- the date in the format YYYYMMDD
Returns
1 on success, otherwise 0

◆ RaveDateTime_setTime()

int RaveDateTime_setTime ( RaveDateTime_t * dt,
const char * value )

Sets the nominal time.

Parameters
[in]dt- self
[in]value- the time in the format HHmmss
Returns
1 on success, otherwise 0

Variable Documentation

◆ RaveDateTime_TYPE

RaveCoreObjectType RaveDateTime_TYPE
extern

Type definition to use when creating a rave object.