feisty meow concerns codebase  2.140
earth_time.cpp File Reference
#include "earth_time.h"
#include "time_stamp.h"
#include <basis/astring.h>
#include <basis/utf_conversion.h>
#include <textual/parser_bits.h>
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
Include dependency graph for earth_time.cpp:

Go to the source code of this file.

Namespaces

 timely
 #include <time.h>
 

Macros

#define LOG(tpr)
 
#define EASY_LT(x, y)
 
#define limit_value(val, max)
 

Functions

time_number timely::limit_day_of_month (time_number &day, time_number days_in_month, time_number days_in_prev_month)
 
time_locus timely::convert (time_number seconds, time_number useconds, const tm &cal_values)
 
time_locus timely::now ()
 returns our current locus in the time continuum. More...
 
time_locus timely::greenwich_now ()
 returns Greenwich Mean Time (their now). More...
 
clock_time timely::time_now ()
 what time is it? More...
 
days timely::day_now ()
 Returns the current local day. More...
 
months timely::month_now ()
 returns the local month. More...
 
time_number timely::year_now ()
 what year is it? More...
 
day_in_year timely::date_now ()
 what day on the calendar is it? More...
 
const char * timely::day_name (days to_name)
 Returns the name of the day "to_name". More...
 
const char * timely::month_name (months to_name)
 Returns the name of the month "to_name". More...
 
const char * timely::short_month_name (months to_name)
 Returns a shorter, constant-length (3 characters) month name. More...
 

Variables

const time_number timely::days_in_month [12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 The number of days in each month in the standard year. More...
 
const time_number timely::leap_days_in_month [12] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 The number of days in each month in a leap year. More...
 
const time_number timely::julian_days_in_month [12] = { 31, 29, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 }
 Number of days in each month based on the julian calendar. More...
 
const time_number timely::julian_leap_days_in_month [12] = { 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30 }
 Number of days in each month of a leap year in the julian calendar. More...
 

Macro Definition Documentation

◆ EASY_LT

#define EASY_LT (   x,
 
)
Value:
if (x < y) return true; \
if (x > y) return false

Definition at line 82 of file earth_time.cpp.

◆ limit_value

#define limit_value (   val,
  max 
)
Value:
if (val < 0) { \
rolls = val / max; \
rolls--; /* subtract an extra one since we definitely roll before -max */ \
val += max * -rolls; \
} else if (val >= max) { \
rolls = val / max; \
val -= max * rolls; \
} else { rolls = 0; }

Definition at line 134 of file earth_time.cpp.

◆ LOG

#define LOG (   tpr)

Definition at line 43 of file earth_time.cpp.