taco-db
0.1.0
|
This file contains date/time utilities adapted from PostgreSQL 14.1 source code. More...
#include "tdb.h"
Go to the source code of this file.
Functions | |
int | date2j (int y, int m, int d) |
date2j() from PostgreSQL utils/adt/datetime.c. More... | |
void | j2date (int jd, int *year, int *month, int *day) |
j2date() from PostgreSQL utils/adt/datetime.c. More... | |
This file contains date/time utilities adapted from PostgreSQL 14.1 source code.
See COPYRIGHT for a copyright notice.
int date2j | ( | int | y, |
int | m, | ||
int | d | ||
) |
date2j() from PostgreSQL utils/adt/datetime.c.
Converts a date (Y-m-d) to a julian day number.
Note that y is the actual year number (not year - 1900); m is from 1 to 12, not from 0.
void j2date | ( | int | jd, |
int * | year, | ||
int * | month, | ||
int * | day | ||
) |
j2date() from PostgreSQL utils/adt/datetime.c.
Converts a julian day number to a date (Y-m-d).
Note that y is the actual year number (not year - 1900); m is from 1 to 12, not from 0.