MHEG5  18.9.0
MHEG5 Documentation
Macros | Functions
mh5date.c File Reference

date functions More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mh5base.h"
#include "mh5date.h"
#include "mh5memory.h"
#include "mh5debug.h"
#include "mherrors.h"
#include "dvb_misc.h"

Go to the source code of this file.

Macros

#define DATE_BUFFER_SIZE   (1024)
 

Functions

U32BIT JulianDate (S32BIT day, S32BIT month, S32BIT year)
 The function JulianDate() calculates the julian day number for the specified day, month and year. If the year is B.C. a negative number must be given. More...
 
void MHEG5getDate (S32BIT *day, S32BIT *sec)
 Modified Julian Date - see Davic 9.2.12.1. More...
 
MHEG5String MHEG5formatDate (MHEG5String format, S32BIT day, S32BIT sec)
 Format date - See Davic part 9.0 - 9.2.12.1. More...
 
S32BIT MHEG5getDayOfWeek (S32BIT day)
 Get Day of Week for Davic-Day 0 is Sunday.... More...
 

Detailed Description

date functions

Date
01/02/2002
Author
R.Freeman

Definition in file mh5date.c.

Macro Definition Documentation

#define DATE_BUFFER_SIZE   (1024)

Definition at line 39 of file mh5date.c.

Function Documentation

U32BIT JulianDate ( S32BIT  day,
S32BIT  month,
S32BIT  year 
)

The function JulianDate() calculates the julian day number for the specified day, month and year. If the year is B.C. a negative number must be given.

Parameters
dayNumber of days S32BITo current month.
monthCurrent month (e.g. Feb = 2).
yearCurrent year (e.g. 2002 or -2002 = 2002 B.C.).
Returns
The function returns the julian day number.

Definition at line 62 of file mh5date.c.

MHEG5String MHEG5formatDate ( MHEG5String  format,
S32BIT  day,
S32BIT  sec 
)

Format date - See Davic part 9.0 - 9.2.12.1.

Parameters
formatMHEG5String format descriptor.
dayNumber of days since November 17 1858.
secNumber of seconds since midnight.
Returns
Formatted date string.

Definition at line 144 of file mh5date.c.

void MHEG5getDate ( S32BIT day,
S32BIT sec 
)

Modified Julian Date - see Davic 9.2.12.1.

Parameters
secNumber of seconds since midnight.
dayNumber of days since November 17, 1858.
Returns
None

Definition at line 111 of file mh5date.c.

S32BIT MHEG5getDayOfWeek ( S32BIT  day)

Get Day of Week for Davic-Day 0 is Sunday....

Parameters
dayNumber of days since Nov 17, 1858.
Returns
Integer day of the week.

Definition at line 285 of file mh5date.c.