#include "git-compat-util.h"
#include "date.h"
#include "gettext.h"
#include "pager.h"
#include "strbuf.h"
time_t tm_to_time_t(const struct tm *tm)
{ … }
static const char *month_names[] = …;
static const char *weekday_names[] = …;
static time_t gm_time_t(timestamp_t time, int tz)
{ … }
static struct tm *time_to_tm(timestamp_t time, int tz, struct tm *tm)
{ … }
static struct tm *time_to_tm_local(timestamp_t time, struct tm *tm)
{ … }
static int local_time_tzoffset(time_t t, struct tm *tm)
{ … }
static int local_tzoffset(timestamp_t time)
{ … }
static void get_time(struct timeval *now)
{ … }
void show_date_relative(timestamp_t time, struct strbuf *timebuf)
{ … }
struct date_mode date_mode_from_type(enum date_mode_type type)
{ … }
static void show_date_normal(struct strbuf *buf, timestamp_t time, struct tm *tm, int tz, struct tm *human_tm, int human_tz, int local)
{ … }
const char *show_date(timestamp_t time, int tz, struct date_mode mode)
{ … }
static const struct { … } timezone_names[] = …;
static int match_string(const char *date, const char *str)
{ … }
static int skip_alpha(const char *date)
{ … }
static int match_alpha(const char *date, struct tm *tm, int *offset)
{ … }
static int set_date(int year, int month, int day, struct tm *now_tm, time_t now, struct tm *tm)
{ … }
static int set_time(long hour, long minute, long second, struct tm *tm)
{ … }
static int is_date_known(struct tm *tm)
{ … }
static int match_multi_number(timestamp_t num, char c, const char *date,
char *end, struct tm *tm, time_t now)
{ … }
static inline int nodate(struct tm *tm)
{ … }
static inline int maybeiso8601(struct tm *tm)
{ … }
static int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt)
{ … }
static int match_tz(const char *date, int *offp)
{ … }
static void date_string(timestamp_t date, int offset, struct strbuf *buf)
{ … }
static int match_object_header_date(const char *date, timestamp_t *timestamp, int *offset)
{ … }
static const timestamp_t timestamp_max = …;
int parse_date_basic(const char *date, timestamp_t *timestamp, int *offset)
{ … }
int parse_expiry_date(const char *date, timestamp_t *timestamp)
{ … }
int parse_date(const char *date, struct strbuf *result)
{ … }
static enum date_mode_type parse_date_type(const char *format, const char **end)
{ … }
void parse_date_format(const char *format, struct date_mode *mode)
{ … }
void date_mode_release(struct date_mode *mode)
{ … }
void datestamp(struct strbuf *out)
{ … }
static time_t update_tm(struct tm *tm, struct tm *now, time_t sec)
{ … }
static void pending_number(struct tm *tm, int *num)
{ … }
static void date_now(struct tm *tm, struct tm *now, int *num)
{ … }
static void date_yesterday(struct tm *tm, struct tm *now, int *num)
{ … }
static void date_time(struct tm *tm, struct tm *now, int hour)
{ … }
static void date_midnight(struct tm *tm, struct tm *now, int *num)
{ … }
static void date_noon(struct tm *tm, struct tm *now, int *num)
{ … }
static void date_tea(struct tm *tm, struct tm *now, int *num)
{ … }
static void date_pm(struct tm *tm, struct tm *now UNUSED, int *num)
{ … }
static void date_am(struct tm *tm, struct tm *now UNUSED, int *num)
{ … }
static void date_never(struct tm *tm, struct tm *now UNUSED, int *num)
{ … }
static const struct special { … } special[] = …;
static const char *number_name[] = …;
static const struct typelen { … } typelen[] = …;
static const char *approxidate_alpha(const char *date, struct tm *tm, struct tm *now, int *num, int *touched)
{ … }
static const char *approxidate_digit(const char *date, struct tm *tm, int *num,
time_t now)
{ … }
static timestamp_t approxidate_str(const char *date,
const struct timeval *tv,
int *error_ret)
{ … }
timestamp_t approxidate_careful(const char *date, int *error_ret)
{ … }
int date_overflows(timestamp_t t)
{ … }