FreeBASIC  0.91.0
fb_datetime.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FB_WEEK_FIRST_SYSTEM   0
 
#define FB_WEEK_FIRST_JAN_1   1
 
#define FB_WEEK_FIRST_FOUR_DAYS   2
 
#define FB_WEEK_FIRST_FULL_WEEK   3
 
#define FB_WEEK_FIRST_DEFAULT   FB_WEEK_FIRST_JAN_1
 
#define FB_WEEK_DAY_SYSTEM   0
 
#define FB_WEEK_DAY_SUNDAY   1
 
#define FB_WEEK_DAY_MONDAY   2
 
#define FB_WEEK_DAY_TUESDAY   3
 
#define FB_WEEK_DAY_WEDNESDAY   4
 
#define FB_WEEK_DAY_THURSDAY   5
 
#define FB_WEEK_DAY_FRIDAY   6
 
#define FB_WEEK_DAY_SATURDAY   7
 
#define FB_WEEK_DAY_DEFAULT   FB_WEEK_DAY_SUNDAY
 
#define FB_TIME_INTERVAL_INVALID   0
 
#define FB_TIME_INTERVAL_YEAR   1
 
#define FB_TIME_INTERVAL_QUARTER   2
 
#define FB_TIME_INTERVAL_MONTH   3
 
#define FB_TIME_INTERVAL_DAY_OF_YEAR   4
 
#define FB_TIME_INTERVAL_DAY   5
 
#define FB_TIME_INTERVAL_WEEKDAY   6
 
#define FB_TIME_INTERVAL_WEEK_OF_YEAR   7
 
#define FB_TIME_INTERVAL_HOUR   8
 
#define FB_TIME_INTERVAL_MINUTE   9
 
#define FB_TIME_INTERVAL_SECOND   10
 
#define fb_hTimeDaysInYear(year)   (365 + fb_hTimeLeap( year ))
 

Typedefs

typedef enum _eFbIntlIndex eFbIntlIndex
 

Enumerations

enum  _eFbIntlIndex { eFIL_DateDivider, eFIL_TimeDivider, eFIL_NumDecimalPoint, eFIL_NumThousandsSeparator }
 

Functions

FBCALL double fb_Timer (void)
 
FBCALL FBSTRINGfb_Time (void)
 
FBCALL int fb_SetTime (FBSTRING *time)
 
FBCALL FBSTRINGfb_Date (void)
 
FBCALL int fb_SetDate (FBSTRING *date)
 Sets the date to the specified value. More...
 
int fb_hSetTime (int h, int m, int s)
 
int fb_hSetDate (int y, int m, int d)
 
FBCALL int fb_IsDate (FBSTRING *s)
 
FBCALL int fb_DateValue (FBSTRING *s)
 
FBCALL int fb_DateSerial (int year, int month, int day)
 
FBCALL int fb_Year (double serial)
 
FBCALL int fb_Month (double serial)
 
FBCALL int fb_Day (double serial)
 
FBCALL int fb_Weekday (double serial, int first_day_of_week)
 Returns the day of week. More...
 
FBCALL double fb_TimeValue (FBSTRING *s)
 
FBCALL double fb_TimeSerial (int hour, int minute, int second)
 
FBCALL int fb_Hour (double serial)
 
FBCALL int fb_Minute (double serial)
 
FBCALL int fb_Second (double serial)
 
FBCALL double fb_Now (void)
 
FBCALL FBSTRINGfb_MonthName (int month, int abbreviation)
 
FBCALL FBSTRINGfb_WeekdayName (int weekday, int abbreviation, int first_day_of_week)
 
FBCALL double fb_DateAdd (FBSTRING *interval, double interval_value_arg, double serial)
 
FBCALL int fb_DatePart (FBSTRING *interval, double serial, int first_day_of_week, int first_day_of_year)
 
FBCALL long long fb_DateDiff (FBSTRING *interval, double serial1, double serial2, int first_day_of_week, int first_day_of_year)
 
int fb_hDateParse (const char *text, size_t text_len, int *pDay, int *pMonth, int *pYear, size_t *pLength)
 
FBCALL int fb_DateParse (FBSTRING *s, int *pDay, int *pMonth, int *pYear)
 
FBCALL void fb_hDateDecodeSerial (double serial, int *pYear, int *pMonth, int *pDay)
 
int fb_hTimeParse (const char *text, size_t text_len, int *pHour, int *pMinute, int *pSecond, size_t *pLength)
 
FBCALL int fb_TimeParse (FBSTRING *s, int *pHour, int *pMinute, int *pSecond)
 
FBCALL void fb_hTimeDecodeSerial (double serial, int *pHour, int *pMinute, int *pSecond, int use_qb_hack)
 
FBCALL int fb_DateTimeParse (FBSTRING *s, int *pDay, int *pMonth, int *pYear, int *pHour, int *pMinute, int *pSecond, int want_date, int want_time)
 
FBCALL void fb_I18nSet (int on_off)
 
FBCALL int fb_I18nGet (void)
 
int fb_hTimeLeap (int year)
 
int fb_hGetDayOfYear (double serial)
 
int fb_hGetDayOfYearEx (int year, int month, int day)
 
int fb_hGetWeekOfYear (int ref_year, double serial, int first_day_of_year, int first_day_of_week)
 
int fb_hGetWeeksOfYear (int ref_year, int first_day_of_year, int first_day_of_week)
 
int fb_hTimeDaysInMonth (int month, int year)
 
void fb_hNormalizeDate (int *pDay, int *pMonth, int *pYear)
 
int fb_hTimeGetIntervalType (FBSTRING *interval)
 
const char * fb_IntlGet (eFbIntlIndex index, int disallow_localized)
 
int fb_IntlGetDateFormat (char *buffer, size_t len, int disallow_localized)
 
int fb_IntlGetTimeFormat (char *buffer, size_t len, int disallow_localized)
 
FBSTRINGfb_IntlGetMonthName (int month, int short_name, int disallow_localized)
 
FBSTRINGfb_IntlGetWeekdayName (int weekday, int short_names, int disallow_localized)
 
const char * fb_DrvIntlGet (eFbIntlIndex index)
 
int fb_DrvIntlGetDateFormat (char *buffer, size_t len)
 
int fb_DrvIntlGetTimeFormat (char *buffer, size_t len)
 
FBSTRINGfb_DrvIntlGetMonthName (int month, int short_name)
 
FBSTRINGfb_DrvIntlGetWeekdayName (int weekday, int short_names)
 

Macro Definition Documentation

#define fb_hTimeDaysInYear (   year)    (365 + fb_hTimeLeap( year ))

Definition at line 50 of file fb_datetime.h.

#define FB_TIME_INTERVAL_DAY   5

Definition at line 43 of file fb_datetime.h.

#define FB_TIME_INTERVAL_DAY_OF_YEAR   4

Definition at line 42 of file fb_datetime.h.

#define FB_TIME_INTERVAL_HOUR   8

Definition at line 46 of file fb_datetime.h.

#define FB_TIME_INTERVAL_INVALID   0

Definition at line 38 of file fb_datetime.h.

#define FB_TIME_INTERVAL_MINUTE   9

Definition at line 47 of file fb_datetime.h.

#define FB_TIME_INTERVAL_MONTH   3

Definition at line 41 of file fb_datetime.h.

#define FB_TIME_INTERVAL_QUARTER   2

Definition at line 40 of file fb_datetime.h.

#define FB_TIME_INTERVAL_SECOND   10

Definition at line 48 of file fb_datetime.h.

#define FB_TIME_INTERVAL_WEEK_OF_YEAR   7

Definition at line 45 of file fb_datetime.h.

#define FB_TIME_INTERVAL_WEEKDAY   6

Definition at line 44 of file fb_datetime.h.

#define FB_TIME_INTERVAL_YEAR   1

Definition at line 39 of file fb_datetime.h.

#define FB_WEEK_DAY_DEFAULT   FB_WEEK_DAY_SUNDAY

Definition at line 36 of file fb_datetime.h.

#define FB_WEEK_DAY_FRIDAY   6

Definition at line 34 of file fb_datetime.h.

#define FB_WEEK_DAY_MONDAY   2

Definition at line 30 of file fb_datetime.h.

#define FB_WEEK_DAY_SATURDAY   7

Definition at line 35 of file fb_datetime.h.

#define FB_WEEK_DAY_SUNDAY   1

Definition at line 29 of file fb_datetime.h.

#define FB_WEEK_DAY_SYSTEM   0

Definition at line 28 of file fb_datetime.h.

#define FB_WEEK_DAY_THURSDAY   5

Definition at line 33 of file fb_datetime.h.

#define FB_WEEK_DAY_TUESDAY   3

Definition at line 31 of file fb_datetime.h.

#define FB_WEEK_DAY_WEDNESDAY   4

Definition at line 32 of file fb_datetime.h.

#define FB_WEEK_FIRST_DEFAULT   FB_WEEK_FIRST_JAN_1

Definition at line 26 of file fb_datetime.h.

#define FB_WEEK_FIRST_FOUR_DAYS   2

Definition at line 24 of file fb_datetime.h.

#define FB_WEEK_FIRST_FULL_WEEK   3

Definition at line 25 of file fb_datetime.h.

#define FB_WEEK_FIRST_JAN_1   1

Definition at line 23 of file fb_datetime.h.

#define FB_WEEK_FIRST_SYSTEM   0

Definition at line 22 of file fb_datetime.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator
eFIL_DateDivider 
eFIL_TimeDivider 
eFIL_NumDecimalPoint 
eFIL_NumThousandsSeparator 

Definition at line 15 of file fb_datetime.h.

Function Documentation

FBCALL FBSTRING* fb_Date ( void  )

Definition at line 7 of file time_date.c.

Here is the call graph for this function:

FBCALL double fb_DateAdd ( FBSTRING interval,
double  interval_value_arg,
double  serial 
)

Definition at line 6 of file time_dateadd.c.

Here is the call graph for this function:

FBCALL long long fb_DateDiff ( FBSTRING interval,
double  serial1,
double  serial2,
int  first_day_of_week,
int  first_day_of_year 
)

Definition at line 7 of file time_datediff.c.

Here is the call graph for this function:

FBCALL int fb_DateParse ( FBSTRING s,
int *  pDay,
int *  pMonth,
int *  pYear 
)

Definition at line 76 of file time_parsedatetime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_DatePart ( FBSTRING interval,
double  serial,
int  first_day_of_week,
int  first_day_of_year 
)

Definition at line 6 of file time_datepart.c.

Here is the call graph for this function:

FBCALL int fb_DateSerial ( int  year,
int  month,
int  day 
)

Definition at line 6 of file time_dateserial.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_DateTimeParse ( FBSTRING s,
int *  pDay,
int *  pMonth,
int *  pYear,
int *  pHour,
int *  pMinute,
int *  pSecond,
int  want_date,
int  want_time 
)

Definition at line 7 of file time_parsedatetime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_DateValue ( FBSTRING s)

Definition at line 6 of file time_datevalue.c.

Here is the call graph for this function:

FBCALL int fb_Day ( double  serial)

Definition at line 58 of file time_decodeserdate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* fb_DrvIntlGet ( eFbIntlIndex  index)

Definition at line 6 of file drv_intl_get.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_DrvIntlGetDateFormat ( char *  buffer,
size_t  len 
)

Definition at line 6 of file drv_intl_getdateformat.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBSTRING* fb_DrvIntlGetMonthName ( int  month,
int  short_name 
)

Definition at line 6 of file drv_intl_getmonthname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_DrvIntlGetTimeFormat ( char *  buffer,
size_t  len 
)

Definition at line 6 of file drv_intl_gettimeformat.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBSTRING* fb_DrvIntlGetWeekdayName ( int  weekday,
int  short_names 
)

Definition at line 6 of file drv_intl_getweekdayname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL void fb_hDateDecodeSerial ( double  serial,
int *  pYear,
int *  pMonth,
int *  pDay 
)

Definition at line 7 of file time_decodeserdate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hDateParse ( const char *  text,
size_t  text_len,
int *  pDay,
int *  pMonth,
int *  pYear,
size_t *  pLength 
)

Definition at line 131 of file time_parsedate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hGetDayOfYear ( double  serial)

Definition at line 98 of file time_decodeserdate.c.

Here is the call graph for this function:

int fb_hGetDayOfYearEx ( int  year,
int  month,
int  day 
)

Definition at line 88 of file time_decodeserdate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hGetWeekOfYear ( int  ref_year,
double  serial,
int  first_day_of_year,
int  first_day_of_week 
)

Definition at line 65 of file time_week.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hGetWeeksOfYear ( int  ref_year,
int  first_day_of_year,
int  first_day_of_week 
)

Definition at line 87 of file time_week.c.

Here is the call graph for this function:

void fb_hNormalizeDate ( int *  pDay,
int *  pMonth,
int *  pYear 
)

Definition at line 27 of file time_core.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_Hour ( double  serial)

Definition at line 49 of file time_decodesertime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hSetDate ( int  y,
int  m,
int  d 
)

Definition at line 4 of file time_setdate.c.

Here is the caller graph for this function:

int fb_hSetTime ( int  h,
int  m,
int  s 
)

Definition at line 4 of file time_settime.c.

Here is the caller graph for this function:

int fb_hTimeDaysInMonth ( int  month,
int  year 
)

Definition at line 16 of file time_core.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL void fb_hTimeDecodeSerial ( double  serial,
int *  pHour,
int *  pMinute,
int *  pSecond,
int  use_qb_hack 
)

Definition at line 6 of file time_decodesertime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_hTimeGetIntervalType ( FBSTRING interval)

Definition at line 82 of file time_core.c.

Here is the caller graph for this function:

int fb_hTimeLeap ( int  year)

Definition at line 6 of file time_core.c.

Here is the caller graph for this function:

int fb_hTimeParse ( const char *  text,
size_t  text_len,
int *  pHour,
int *  pMinute,
int *  pSecond,
size_t *  pLength 
)

Definition at line 54 of file time_parsetime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_I18nGet ( void  )

Definition at line 14 of file intl_getset.c.

Here is the caller graph for this function:

FBCALL void fb_I18nSet ( int  on_off)

Definition at line 8 of file intl_getset.c.

const char* fb_IntlGet ( eFbIntlIndex  index,
int  disallow_localized 
)

Definition at line 6 of file intl_get.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_IntlGetDateFormat ( char *  buffer,
size_t  len,
int  disallow_localized 
)

Definition at line 6 of file intl_getdateformat.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBSTRING* fb_IntlGetMonthName ( int  month,
int  short_name,
int  disallow_localized 
)

Definition at line 36 of file intl_getmonthname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int fb_IntlGetTimeFormat ( char *  buffer,
size_t  len,
int  disallow_localized 
)

Definition at line 6 of file intl_gettimeformat.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBSTRING* fb_IntlGetWeekdayName ( int  weekday,
int  short_names,
int  disallow_localized 
)

Definition at line 26 of file intl_getweekdayname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_IsDate ( FBSTRING s)

Definition at line 6 of file time_isdate.c.

Here is the call graph for this function:

FBCALL int fb_Minute ( double  serial)

Definition at line 56 of file time_decodesertime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_Month ( double  serial)

Definition at line 51 of file time_decodeserdate.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL FBSTRING* fb_MonthName ( int  month,
int  abbreviation 
)

Definition at line 6 of file time_monthname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL double fb_Now ( void  )

Definition at line 7 of file time_now.c.

Here is the call graph for this function:

FBCALL int fb_Second ( double  serial)

Definition at line 63 of file time_decodesertime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_SetDate ( FBSTRING date)

Sets the date to the specified value.

Valid formats:

  • mm/dd/yy
  • mm/dd/yyyy
  • mm-dd-yy
  • mm-dd-yyyy

VBDOS converts a 2-digit year by adding 1900.

See Also
fb_Date()

Definition at line 18 of file time_dateset.c.

Here is the call graph for this function:

FBCALL int fb_SetTime ( FBSTRING time)

Definition at line 7 of file time_timeset.c.

Here is the call graph for this function:

FBCALL FBSTRING* fb_Time ( void  )

Definition at line 7 of file time_time.c.

Here is the call graph for this function:

FBCALL int fb_TimeParse ( FBSTRING s,
int *  pHour,
int *  pMinute,
int *  pSecond 
)

Definition at line 85 of file time_parsedatetime.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL double fb_Timer ( void  )

Definition at line 6 of file time_timer.c.

Here is the caller graph for this function:

FBCALL double fb_TimeSerial ( int  hour,
int  minute,
int  second 
)

Definition at line 6 of file time_timeserial.c.

Here is the caller graph for this function:

FBCALL double fb_TimeValue ( FBSTRING s)

Definition at line 6 of file time_timevalue.c.

Here is the call graph for this function:

FBCALL int fb_Weekday ( double  serial,
int  first_day_of_week 
)

Returns the day of week.

Returns
1 = Sunday, ... 7 = Saturday

Definition at line 69 of file time_decodeserdate.c.

Here is the caller graph for this function:

FBCALL FBSTRING* fb_WeekdayName ( int  weekday,
int  abbreviation,
int  first_day_of_week 
)

Definition at line 6 of file time_weekdayname.c.

Here is the call graph for this function:

Here is the caller graph for this function:

FBCALL int fb_Year ( double  serial)

Definition at line 44 of file time_decodeserdate.c.

Here is the call graph for this function:

Here is the caller graph for this function: