gwenhywfar
4.3.3
|
#include "gwendate_p.h"
#include "i18n_l.h"
#include <gwenhywfar/debug.h>
#include <gwenhywfar/misc.h>
#include <time.h>
#include <ctype.h>
Go to the source code of this file.
Variables | |
static const uint8_t | daysInMonth [12] |
void GWEN_Date__fillTmplChars | ( | const GWEN_DATE * | t, |
GWEN_DATE_TMPLCHAR_LIST * | ll | ||
) |
Definition at line 471 of file gwendate.c.
References DBG_ERROR, GWEN_Date_WeekDay(), GWEN_LOGDOMAIN, I18N, and NULL.
Referenced by GWEN_Date_toStringWithTemplate().
GWEN_DATE_TMPLCHAR* GWEN_Date__findTmplChar | ( | GWEN_DATE_TMPLCHAR_LIST * | ll, |
char | c | ||
) |
Definition at line 426 of file gwendate.c.
Referenced by GWEN_Date__sampleTmplChars(), and GWEN_Date_toStringWithTemplate().
void GWEN_Date__sampleTmplChars | ( | GWEN_UNUSED const GWEN_DATE * | t, |
const char * | tmpl, | ||
GWEN_UNUSED GWEN_BUFFER * | buf, | ||
GWEN_DATE_TMPLCHAR_LIST * | ll | ||
) |
Definition at line 442 of file gwendate.c.
References DBG_DEBUG, GWEN_Date__findTmplChar(), GWEN_DateTmplChar_new(), and GWEN_LOGDOMAIN.
Referenced by GWEN_Date_toStringWithTemplate().
Definition at line 250 of file gwendate.c.
GWEN_DATE* GWEN_Date_CurrentDate | ( | void | ) |
Create a date from the current local date.
Definition at line 136 of file gwendate.c.
References GWEN_Date_fromLocalTime().
int GWEN_Date_DaysInMonth | ( | const GWEN_DATE * | gd | ) |
Definition at line 181 of file gwendate.c.
References daysInMonth.
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 193 of file gwendate.c.
References GWEN_Date_free(), and GWEN_Date_fromGregorian().
Definition at line 269 of file gwendate.c.
Definition at line 145 of file gwendate.c.
References GWEN_Date_fromGregorian().
void GWEN_Date_free | ( | GWEN_DATE * | gd | ) |
Destructor.
Definition at line 166 of file gwendate.c.
References GWEN_FREE_OBJECT.
Referenced by GWEN_Date_DaysInYear().
GWEN_DATE* GWEN_Date_fromGmTime | ( | time_t | t | ) |
Definition at line 119 of file gwendate.c.
References GWEN_Date_fromGregorian(), and NULL.
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_dup(), GWEN_Date_fromGmTime(), GWEN_Date_fromLocalTime(), GWEN_Date_fromString(), and GWEN_Date_fromStringWithTemplate().
GWEN_DATE* GWEN_Date_fromJulian | ( | int | julian | ) |
Create a date from the julian calender.
julian | date in julian calender |
Definition at line 76 of file gwendate.c.
References GWEN_NEW_OBJECT.
GWEN_DATE* GWEN_Date_fromLocalTime | ( | time_t | t | ) |
Definition at line 103 of file gwendate.c.
References GWEN_Date_fromGregorian(), and NULL.
Referenced by GWEN_Date_CurrentDate().
GWEN_DATE* GWEN_Date_fromString | ( | const char * | s | ) |
Definition at line 152 of file gwendate.c.
References DBG_ERROR, GWEN_Date_fromGregorian(), GWEN_LOGDOMAIN, and NULL.
Referenced by GWEN_Date_fromTime().
GWEN_DATE* GWEN_Date_fromStringWithTemplate | ( | const char * | s, |
const char * | tmpl | ||
) |
Definition at line 293 of file gwendate.c.
References DBG_DEBUG, DBG_ERROR, DBG_INFO, DBG_VERBOUS, GWEN_Date_fromGregorian(), GWEN_LOGDOMAIN, and NULL.
Definition at line 278 of file gwendate.c.
References GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_Date_fromString(), and GWEN_Time_toString().
int GWEN_Date_GetDay | ( | const GWEN_DATE * | gd | ) |
Definition at line 222 of file gwendate.c.
int GWEN_Date_GetJulian | ( | const GWEN_DATE * | gd | ) |
Definition at line 229 of file gwendate.c.
int GWEN_Date_GetMonth | ( | const GWEN_DATE * | gd | ) |
Definition at line 215 of file gwendate.c.
const char* GWEN_Date_GetString | ( | const GWEN_DATE * | gd | ) |
Definition at line 243 of file gwendate.c.
int GWEN_Date_GetYear | ( | const GWEN_DATE * | gd | ) |
Definition at line 208 of file gwendate.c.
int GWEN_Date_IsLeapYear | ( | int | y | ) |
Definition at line 174 of file gwendate.c.
int GWEN_Date_toStringWithTemplate | ( | const GWEN_DATE * | t, |
const char * | tmpl, | ||
GWEN_BUFFER * | buf | ||
) |
Definition at line 538 of file gwendate.c.
References GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Date__fillTmplChars(), GWEN_Date__findTmplChar(), and GWEN_Date__sampleTmplChars().
int GWEN_Date_WeekDay | ( | const GWEN_DATE * | gd | ) |
Definition at line 236 of file gwendate.c.
Referenced by GWEN_Date__fillTmplChars().
void GWEN_DateTmplChar_free | ( | GWEN_DATE_TMPLCHAR * | e | ) |
Definition at line 416 of file gwendate.c.
References GWEN_FREE_OBJECT, and GWEN_LIST_FINI.
GWEN_DATE_TMPLCHAR* GWEN_DateTmplChar_new | ( | char | c | ) |
Definition at line 396 of file gwendate.c.
References GWEN_LIST_INIT, and GWEN_NEW_OBJECT.
Referenced by GWEN_Date__sampleTmplChars().
|
static |
Definition at line 42 of file gwendate.c.
Referenced by GWEN_Date_DaysInMonth().