ARB
Classes | Macros | Functions | Variables
date.cxx File Reference
#include "fun.h"
#include "global.h"
#include <time.h>
#include <sys/time.h>
Include dependency graph for date.cxx:

Go to the source code of this file.

Classes

class  SetOnce
 

Macros

#define SIZE   128
 

Functions

bool two_char (const char *str, char determ)
 
int ismonth (const char *str)
 
static __ATTR__USERESULT bool find_date (const char *date_string, int *month, int *day, int *year)
 
static int isdatenum (char *Str)
 
static __ATTR__USERESULT bool find_date_long_form (const char *date_string, int *monthPtr, int *dayPtr, int *yearPtr)
 
bool is_genbank_date (const char *str)
 
const chargenbank_date (const char *other_date)
 
const chartoday_date ()
 
const chargcg_date (const char *input)
 

Variables

static const charERROR_DATE = "\?\?-\?\?\?-\?\?\?\?"
 
static const charMON [12]
 
static const charMonth [12]
 
static unsigned char days_in_month [12+1]
 

Macro Definition Documentation

#define SIZE   128

Function Documentation

bool two_char ( const char str,
char  determ 
)
inline

Definition at line 31 of file date.cxx.

Referenced by find_date().

int ismonth ( const char str)
inline

Definition at line 38 of file date.cxx.

References str_iequal().

Referenced by find_date(), find_date_long_form(), and gcg_date().

static __ATTR__USERESULT bool find_date ( const char date_string,
int month,
int day,
int year 
)
static

Definition at line 49 of file date.cxx.

References ismonth(), str0len(), and two_char().

Referenced by genbank_date().

static int isdatenum ( char Str)
static

Definition at line 86 of file date.cxx.

References length, and str0len().

Referenced by find_date_long_form().

static __ATTR__USERESULT bool find_date_long_form ( const char date_string,
int monthPtr,
int dayPtr,
int yearPtr 
)
static
bool is_genbank_date ( const char str)
inline

Definition at line 158 of file date.cxx.

References str0len().

Referenced by genbank_date().

const char* genbank_date ( const char other_date)
const char* today_date ( void  )

Definition at line 214 of file date.cxx.

References line, and SIZE.

Referenced by etog(), gcg_seq_out(), FINAL_TYPE< SEQTYPE >::get_date(), macke_out_header(), mtog(), and paup_print_headerstart().

const char* gcg_date ( const char input)

Definition at line 232 of file date.cxx.

References ca_assert, IF_ASSERTION_USED, ismonth(), and SIZE.

Referenced by gcg_seq_out().

Variable Documentation

const char* ERROR_DATE = "\?\?-\?\?\?-\?\?\?\?"
static

Definition at line 9 of file date.cxx.

const char* MON[12]
static
Initial value:
= {
"JAN", "FEB", "MAR",
"APR", "MAY", "JUN",
"JUL", "AUG", "SEP",
"OCT", "NOV", "DEC"
}

Definition at line 11 of file date.cxx.

const char* Month[12]
static
Initial value:
= {
"January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December"
}

Definition at line 18 of file date.cxx.

unsigned char days_in_month[12+1]
static
Initial value:
= {
0xFF,
31, 29, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31
}

Definition at line 25 of file date.cxx.

Referenced by find_date_long_form(), and genbank_date().