|
gwenhywfar
4.99.15beta
|
#include <gwenhywfar/gwenhywfarapi.h>#include <gwenhywfar/types.h>#include <gwenhywfar/buffer.h>#include <gwenhywfar/gwentime.h>#include <time.h>
Go to the source code of this file.
Typedefs | |
| typedef struct GWEN_DATE | GWEN_DATE |
Definition at line 34 of file gwendate.h.
| GWENHYWFAR_API void GWEN_Date_AddDays | ( | GWEN_DATE * | gd, |
| int | days | ||
| ) |
Add days to the given date.
Definition at line 101 of file gwendate.c.
References GWEN_Date_setJulian().

| GWENHYWFAR_API int GWEN_Date_Compare | ( | const GWEN_DATE * | gd1, |
| const GWEN_DATE * | gd0 | ||
| ) |
Definition at line 329 of file gwendate.c.
Referenced by test_date().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_CurrentDate | ( | void | ) |
Create a date from the current local date.
Definition at line 186 of file gwendate.c.
References GWEN_Date_fromLocalTime().
Referenced by test_date().


| GWENHYWFAR_API int GWEN_Date_DaysInMonth | ( | const GWEN_DATE * | gd | ) |
Definition at line 252 of file gwendate.c.
References daysInMonth.
| GWENHYWFAR_API int GWEN_Date_DaysInYear | ( | 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.
Definition at line 265 of file gwendate.c.
References GWEN_Date_free(), and GWEN_Date_fromGregorian().

| GWENHYWFAR_API int GWEN_Date_Diff | ( | const GWEN_DATE * | gd1, |
| const GWEN_DATE * | gd0 | ||
| ) |
Definition at line 349 of file gwendate.c.
| GWENHYWFAR_API GWEN_DATE* GWEN_Date_dup | ( | const GWEN_DATE * | ogd | ) |
Definition at line 196 of file gwendate.c.
References GWEN_NEW_OBJECT.
| GWENHYWFAR_API void GWEN_Date_free | ( | GWEN_DATE * | gd | ) |
Destructor.
Definition at line 235 of file gwendate.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_Date_DaysInYear(), GWEN_Date_GetLastHalfYearEnd(), GWEN_Date_GetLastHalfYearStart(), GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetLastQuarterYearEnd(), GWEN_Date_GetLastQuarterYearStart(), GWEN_Date_GetLastYearEnd(), GWEN_Date_GetLastYearStart(), and GWEN_Xml2Db_ConvertAndSetCharValue().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromDb | ( | GWEN_DB_NODE * | db | ) |
Definition at line 704 of file gwendate.c.
References DBG_INFO, DBG_VERBOUS, GWEN_Date_fromString(), GWEN_DB_GetCharValue(), GWEN_LOGDOMAIN, and NULL.

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromGmTime | ( | time_t | t | ) |
Definition at line 168 of file gwendate.c.
References GWEN_Date_fromGregorian(), and NULL.

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromGregorian | ( | int | y, |
| int | m, | ||
| int | d | ||
| ) |
Create a date from the gregorian calender using year, month and day.
| y | year (e.g. 2009) |
| m | month (1-12) |
| d | day of month (1-31) |
Definition at line 49 of file gwendate.c.
References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_NEW_OBJECT, and NULL.
Referenced by GWEN_Date_DaysInYear(), GWEN_Date_fromGmTime(), GWEN_Date_fromLocalTime(), GWEN_Date_fromString(), GWEN_Date_fromStringWithTemplate(), GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetThisHalfYearEnd(), GWEN_Date_GetThisHalfYearStart(), GWEN_Date_GetThisMonthEnd(), GWEN_Date_GetThisMonthStart(), GWEN_Date_GetThisQuarterYearEnd(), GWEN_Date_GetThisQuarterYearStart(), GWEN_Date_GetThisYearEnd(), and GWEN_Date_GetThisYearStart().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromJulian | ( | int | julian | ) |
Create a date from the julian calender.
| julian | date in julian calender |
Definition at line 115 of file gwendate.c.
References GWEN_Date_setJulian(), and GWEN_NEW_OBJECT.
Referenced by GWEN_Date_GetLastHalfYearEnd(), GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetLastQuarterYearEnd(), and GWEN_Date_GetLastYearEnd().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromLocalTime | ( | time_t | t | ) |
Definition at line 126 of file gwendate.c.
References GWEN_Date_fromGregorian(), and NULL.
Referenced by GWEN_Date_CurrentDate(), and test_date().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromString | ( | const char * | s | ) |
Definition at line 217 of file gwendate.c.
References DBG_INFO, GWEN_Date_fromGregorian(), GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_Date_fromDb(), and GWEN_Date_fromTime().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromStringWithTemplate | ( | const char * | s, |
| const char * | tmpl | ||
| ) |
Definition at line 375 of file gwendate.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_VERBOUS, GWEN_Date_fromGregorian(), GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_Xml2Db_ConvertAndSetCharValue().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_fromTime | ( | const GWEN_TIME * | ti | ) |
Definition at line 359 of file gwendate.c.
References GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Date_fromString(), and GWEN_Time_toString().

| GWENHYWFAR_API int GWEN_Date_GetDay | ( | const GWEN_DATE * | gd | ) |
Definition at line 297 of file gwendate.c.
| GWENHYWFAR_API int GWEN_Date_GetJulian | ( | const GWEN_DATE * | gd | ) |
Definition at line 305 of file gwendate.c.
Referenced by GWEN_Date_GetLastHalfYearEnd(), GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetLastQuarterYearEnd(), and GWEN_Date_GetLastYearEnd().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastHalfYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 918 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_fromJulian(), GWEN_Date_GetJulian(), and GWEN_Date_GetThisHalfYearStart().
Referenced by GWEN_Date_GetLastHalfYearStart().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastHalfYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 905 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_GetLastHalfYearEnd(), and GWEN_Date_GetThisHalfYearStart().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastMonthEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 866 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_fromGregorian(), GWEN_Date_fromJulian(), GWEN_Date_GetJulian(), GWEN_Date_GetMonth(), and GWEN_Date_GetYear().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastMonthStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 849 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_fromGregorian(), GWEN_Date_fromJulian(), GWEN_Date_GetJulian(), GWEN_Date_GetMonth(), and GWEN_Date_GetYear().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastQuarterYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 892 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_fromJulian(), GWEN_Date_GetJulian(), and GWEN_Date_GetThisQuarterYearStart().
Referenced by GWEN_Date_GetLastQuarterYearStart().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastQuarterYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 879 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_GetLastQuarterYearEnd(), and GWEN_Date_GetThisQuarterYearStart().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 944 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_fromJulian(), GWEN_Date_GetJulian(), and GWEN_Date_GetThisYearStart().
Referenced by GWEN_Date_GetLastYearStart().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetLastYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 931 of file gwendate.c.
References GWEN_Date_free(), GWEN_Date_GetLastYearEnd(), and GWEN_Date_GetThisYearStart().

| GWENHYWFAR_API int GWEN_Date_GetMonth | ( | const GWEN_DATE * | gd | ) |
Definition at line 289 of file gwendate.c.
Referenced by GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetThisHalfYearEnd(), GWEN_Date_GetThisHalfYearStart(), GWEN_Date_GetThisMonthEnd(), GWEN_Date_GetThisMonthStart(), GWEN_Date_GetThisQuarterYearEnd(), and GWEN_Date_GetThisQuarterYearStart().

| GWENHYWFAR_API const char* GWEN_Date_GetString | ( | const GWEN_DATE * | gd | ) |
Definition at line 321 of file gwendate.c.
Referenced by GWEN_Date_toDb(), GWEN_Xml2Db_ConvertAndSetCharValue(), and test_date().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisHalfYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 825 of file gwendate.c.
References GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), and GWEN_Date_GetYear().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisHalfYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 815 of file gwendate.c.
References GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), and GWEN_Date_GetYear().
Referenced by GWEN_Date_GetLastHalfYearEnd(), and GWEN_Date_GetLastHalfYearStart().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisMonthEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 735 of file gwendate.c.
References DBG_ERROR, GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), GWEN_Date_GetYear(), GWEN_Date_IsLeapYear(), and GWEN_LOGDOMAIN.

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisMonthStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 728 of file gwendate.c.
References GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), and GWEN_Date_GetYear().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisQuarterYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 794 of file gwendate.c.
References GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), GWEN_Date_GetYear(), and NULL.

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisQuarterYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 773 of file gwendate.c.
References GWEN_Date_fromGregorian(), GWEN_Date_GetMonth(), GWEN_Date_GetYear(), and NULL.
Referenced by GWEN_Date_GetLastQuarterYearEnd(), and GWEN_Date_GetLastQuarterYearStart().


| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisYearEnd | ( | const GWEN_DATE * | dt | ) |
Definition at line 842 of file gwendate.c.
References GWEN_Date_fromGregorian(), and GWEN_Date_GetYear().

| GWENHYWFAR_API GWEN_DATE* GWEN_Date_GetThisYearStart | ( | const GWEN_DATE * | dt | ) |
Definition at line 835 of file gwendate.c.
References GWEN_Date_fromGregorian(), and GWEN_Date_GetYear().
Referenced by GWEN_Date_GetLastYearEnd(), and GWEN_Date_GetLastYearStart().


| GWENHYWFAR_API int GWEN_Date_GetYear | ( | const GWEN_DATE * | gd | ) |
Definition at line 281 of file gwendate.c.
Referenced by GWEN_Date_GetLastMonthEnd(), GWEN_Date_GetLastMonthStart(), GWEN_Date_GetThisHalfYearEnd(), GWEN_Date_GetThisHalfYearStart(), GWEN_Date_GetThisMonthEnd(), GWEN_Date_GetThisMonthStart(), GWEN_Date_GetThisQuarterYearEnd(), GWEN_Date_GetThisQuarterYearStart(), GWEN_Date_GetThisYearEnd(), and GWEN_Date_GetThisYearStart().

| GWENHYWFAR_API int GWEN_Date_IsLeapYear | ( | int | y | ) |
Definition at line 244 of file gwendate.c.
Referenced by GWEN_Date_GetThisMonthEnd().

| GWENHYWFAR_API void GWEN_Date_SubDays | ( | GWEN_DATE * | gd, |
| int | days | ||
| ) |
Subtract days from the given date.
Definition at line 108 of file gwendate.c.
References GWEN_Date_setJulian().

| GWENHYWFAR_API int GWEN_Date_toDb | ( | const GWEN_DATE * | dt, |
| GWEN_DB_NODE * | db | ||
| ) |
Definition at line 692 of file gwendate.c.
References GWEN_Date_GetString(), GWEN_DB_FLAGS_OVERWRITE_VARS, and GWEN_DB_SetCharValue().

| GWENHYWFAR_API time_t GWEN_Date_toLocalTime | ( | const GWEN_DATE * | gd | ) |
Definition at line 143 of file gwendate.c.
Referenced by test_date().

| GWENHYWFAR_API int GWEN_Date_toStringWithTemplate | ( | const GWEN_DATE * | t, |
| const char * | tmpl, | ||
| GWEN_BUFFER * | buf | ||
| ) |
Definition at line 650 of file gwendate.c.
References GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Date__fillTmplChars(), GWEN_Date__findTmplChar(), and GWEN_Date__sampleTmplChars().

| GWENHYWFAR_API int GWEN_Date_WeekDay | ( | const GWEN_DATE * | gd | ) |
Definition at line 313 of file gwendate.c.
Referenced by GWEN_Date__fillTmplChars().

1.8.15