Defines | |
#define | FALSE 0 |
#define | TRUE 1 |
Typedefs | |
typedef unsigned char | byte |
Functions | |
size_t | wc_strftime (char *s, size_t max, const char *format, const struct tm *tm) |
Wrapper around strftime() or strftime_l() depending upon how our build is configured. | |
void | fmt_date (char *buf, time_t thetime, int brief) |
Format a date/time stamp for output. | |
void | fmt_time (char *buf, time_t thetime) |
Format TIME ONLY for output. | |
time_t | httpdate_to_timestamp (char *buf) |
Break down the timestamp used in HTTP headers Should read rfc1123 and rfc850 dates OK. |
#define FALSE 0 |
no.
Definition at line 14 of file fmt_date.c.
#define TRUE 1 |
yes.
Definition at line 15 of file fmt_date.c.
typedef unsigned char byte |
a byte.
Definition at line 12 of file fmt_date.c.
size_t wc_strftime | ( | char * | s, | |
size_t | max, | |||
const char * | format, | |||
const struct tm * | tm | |||
) |
Wrapper around strftime() or strftime_l() depending upon how our build is configured.
s | String target buffer | |
max | Maximum size of string target buffer | |
format | strftime() format | |
tm | Input date/time |
Definition at line 26 of file fmt_date.c.
References wc_locales.
Referenced by cal_process_object(), calendar_brief_month_view(), calendar_day_view(), calendar_month_view(), calendar_month_view_brief_events(), calendar_month_view_display_events(), display_icaltimetype_as_webform(), fmt_date(), and output_date().
void fmt_date | ( | char * | buf, | |
time_t | thetime, | |||
int | brief | |||
) |
Format a date/time stamp for output.
buf | the output buffer | |
thetime | time to convert to string | |
brief | do we want compact view????? |
If date == today, show only the time
Otherwise, for messages up to 6 months old, show the month and day, and the time
older than 6 months, show only the date
Definition at line 47 of file fmt_date.c.
References get_preference(), and wc_strftime().
Referenced by cal_process_object(), calendar_month_view_display_events(), display_enter(), display_queue_msg(), display_summarized(), do_tasks_view(), pullquote_message(), and read_message().
void fmt_time | ( | char * | buf, | |
time_t | thetime | |||
) |
Format TIME ONLY for output.
buf | the output buffer | |
thetime | time to format into buf |
Definition at line 98 of file fmt_date.c.
References get_preference().
Referenced by calendar_summary_view().
time_t httpdate_to_timestamp | ( | char * | buf | ) |
Break down the timestamp used in HTTP headers Should read rfc1123 and rfc850 dates OK.
buf | time to parse |
Skip day of week, to number
Get month
April, August
December
February
March, May
January, June, July
November
October
September
NOTREACHED
Get year
Get hour
Get minute
Get second
Got everything; let's go
First, change to UTC
Definition at line 137 of file fmt_date.c.
Referenced by context_loop().