File: DateTimeUtils.h

package info (click to toggle)
postman 2.0-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,036 kB
  • ctags: 3,078
  • sloc: cpp: 31,131; ansic: 1,948; sh: 787; makefile: 285
file content (44 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
DateTimeUtils.h
*/

#ifndef __DATETIME_UTILS_H
#define __DATETIME_UTILS_H

#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <pwd.h>
#include <malloc.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <ctype.h>
#include <syslog.h>
#include <dirent.h>
#include <sys/times.h>                                             
#include <signal.h>

#define NUMBER_MONTHS      12
#define NUMBER_DAYSFORWEEK  7

int CurrentYear (void);
int CurrentMonth (void);
int CurrentDay (void);
int DayOfWeek (long julianDay);
bool IsLeapYear (int year);
int DaysOfMonth (int amonth, int ayear);
long GregorianToJulian (int day, int month, int year);
void JulianToGregorian (long julianDay, int& day, int& month, int& year);
const char *getLongMonth (int amonth);
const char *getShortMonth (int amonth);
const char *getLongDay (int aday);
const char *getShortDay2 (int aday);    
const char *getShortDay3 (int aday);        
                                                           
#endif