/usr/include/gwenhywfar4/gwenhywfar/gwendate.h is in libgwenhywfar-core-dev 4.20.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | /***************************************************************************
begin : Tue Jul 07 2009
copyright : (C) 2009 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* 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 2.1 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 library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWEN_DATE_H
#define GWEN_DATE_H
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/buffer.h>
typedef struct GWEN_DATE GWEN_DATE;
#include <gwenhywfar/gwentime.h>
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Create a date from the gregorian calender using year, month and day.
* @param y year (e.g. 2009)
* @param m month (1-12)
* @param d day of month (1-31)
*/
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromGregorian(int y, int m, int d);
/**
* Create a date from the julian calender.
* @param julian date in julian calender
*/
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromJulian(int julian);
/**
* Create a date from the current local date.
*/
GWENHYWFAR_API GWEN_DATE *GWEN_Date_CurrentDate(void);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromString(const char *s);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_dup(const GWEN_DATE *ogd);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromTime(const GWEN_TIME *ti);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromLocalTime(time_t t);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromGmTime(time_t t);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromStringWithTemplate(const char *s, const char *tmpl);
GWENHYWFAR_API int GWEN_Date_toStringWithTemplate(const GWEN_DATE *t,
const char *tmpl,
GWEN_BUFFER *buf);
/**
* Destructor.
*/
GWENHYWFAR_API void GWEN_Date_free(GWEN_DATE *gd);
GWENHYWFAR_API const char *GWEN_Date_GetString(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_DaysInMonth(const GWEN_DATE *gd);
/**
* Returns the distance between the given date and the begin of that year.
* E.g. if the given date is the 1st of January the result is 0.
*/
GWENHYWFAR_API int GWEN_Date_DaysInYear(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_GetYear(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_GetMonth(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_GetDay(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_WeekDay(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_GetJulian(const GWEN_DATE *gd);
GWENHYWFAR_API int GWEN_Date_IsLeapYear(int y);
GWENHYWFAR_API int GWEN_Date_Compare(const GWEN_DATE *gd1, const GWEN_DATE *gd0);
GWENHYWFAR_API int GWEN_Date_Diff(const GWEN_DATE *gd1, const GWEN_DATE *gd0);
GWENHYWFAR_API int GWEN_Date_toDb(const GWEN_DATE *dt, GWEN_DB_NODE *db);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_fromDb(GWEN_DB_NODE *db);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisMonthStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisMonthEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisQuarterYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisQuarterYearEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisHalfYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisHalfYearEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetThisYearEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastMonthStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastMonthEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastQuarterYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastQuarterYearEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastHalfYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastHalfYearEnd(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastYearStart(const GWEN_DATE *dt);
GWENHYWFAR_API GWEN_DATE *GWEN_Date_GetLastYearEnd(const GWEN_DATE *dt);
#ifdef __cplusplus
}
#endif
#endif
|