#ifndef _WMR_CONVERT_H
#define _WMR_CONVERT_H

#include "jd.h"
#include "app_general.h"

typedef enum convert_type
{
    celsius_2_fahrenheit,
    celsius_2_kelvin,
    mps_2_kmph,
    mps_2_mph,
    mb_2_mmhg,
    mb_2_cmhg,
    mb_2_kpa,
  
  convert_type_sentinel
} convert_type;

#define NR_CONVERSIONS  (convert_type_sentinel)

typedef enum string_convert_type
{
  jd_2_sun_geocentric_longitude,
  jd_2_sun_geocentric_latitude,
  jd_2_sun_distance_au,
  jd_2_ymdhms_utc,
  jd_2_ymdhm_utc,
  jd_2_ymd_utc,
  jd_2_md_utc,
  jd_2_hms_utc,
  jd_2_hm_utc,
  jd_2_yyyy_utc,
  jd_2_month_utc,
  jd_2_day_utc,
  jd_2_hh_utc,
  jd_2_mm_utc,
  jd_2_ss_utc,
  jd_2_dow_utc,
  jd_2_ymdhms_solar,
  jd_2_ymdhm_solar,
  jd_2_ymd_solar,
  jd_2_md_solar,
  jd_2_hms_solar,
  jd_2_hm_solar,
  jd_2_yyyy_solar,
  jd_2_month_solar,
  jd_2_day_solar,
  jd_2_hh_solar,
  jd_2_mm_solar,
  jd_2_ss_solar,
  jd_2_dow_solar,
  jd_2_ymdhms_mean_solar,
  jd_2_ymdhm_mean_solar,
  jd_2_ymd_mean_solar,
  jd_2_md_mean_solar,
  jd_2_hms_mean_solar,
  jd_2_hm_mean_solar,
  jd_2_yyyy_mean_solar,
  jd_2_month_mean_solar,
  jd_2_day_mean_solar,
  jd_2_hh_mean_solar,
  jd_2_mm_mean_solar,
  jd_2_ss_mean_solar,
  jd_2_dow_mean_solar,
  jd_2_ymdhms_local,
  jd_2_ymdhm_local,
  jd_2_ymd_local,
  jd_2_md_local,
  jd_2_hms_local,
  jd_2_hm_local,
  jd_2_yyyy_local,
  jd_2_month_local,
  jd_2_day_local,
  jd_2_hh_local,
  jd_2_mm_local,
  jd_2_ss_local,
  jd_2_dow_local,
  jd_2_rel_dow_in_month,
  jd_2_last_dow_in_month,
  jd_today,
  is_gregorian_leap_year,
  last_new_moon,
  first_quarter_moon,
  full_moon,
  last_quarter_moon,
  new_moon,    
  summer_solstice,
  winter_solstice,
  vernal_equinox,
  autumnal_equinox,
  easter,
  jd_days_till,
  jd_time_till,
  next_sunday,
  next_monday,
  next_tuesday,
  next_wednesday,
  next_thursday,
  next_friday,
  next_saturday,
  next_day,
  next_month,
  next_year,
  prev_sunday,
  prev_monday,
  prev_tuesday,
  prev_wednesday,
  prev_thursday,
  prev_friday,
  prev_saturday,
  prev_day,
  prev_month,
  prev_year,
  time_2_jd,
  jd_2_inet_beats,
  jd_2_inet_date,
  jd_2_inet_date_and_beats,
  jd_2_delta_s,
  jd_2_delta_ms,
  jd_2_delta_hms,
  jd_2_delta_dhms,
  jd_2_delta_m,
  jd_2_delta_hm,
  jd_2_delta_dhm,
  jd_2_delta_h,
  jd_2_delta_dh,
  jd_2_delta_d,
  jd_2_delta_second,
  jd_2_delta_minute,
  jd_2_delta_hour,
  uangle_2_s,
  uangle_2_m,
  uangle_2_ms,
  uangle_2_d,
  uangle_2_dm,
  uangle_2_dms,
  uangle_2_seconds,
  uangle_2_minutes,
  uangle_2_degrees,
  absolute,
  func_sin,
  func_cos,
  func_tan,
  func_sind,
  func_cosd,
  func_tand,
  func_asin,
  func_acos,
  func_atan,
  func_asind,
  func_acosd,
  func_atand,
  func_ln,
  func_exp, 
  
  string_convert_type_sentinel
  
} string_convert_type;

#define NR_STRING_CONVERSIONS  (string_convert_type_sentinel)

#define CONVERTEDSTRING_LENGTH (100)

Boolean
is_a_month(const char * txt_month, int * the_month);

Boolean 
is_a_day (const char * txt_day, weekday_type * wd);

Boolean
is_leap_year (int the_year);

Boolean 
is_an_occurence (const char * txt_occurence, occurence_type * occurence);

char const *
count_string (int the_count);

char const *
days_short (int the_dow);

char const *
asian_year_name (int the_chinese_year);

char const *
dutch_month(int the_month);

char const *
islamic_month(int the_month);

char const *
islamic_weekday(weekday_type the_weekday);

char const *
compass_point (double angle);

char const *
passion_day_name (int days_to_go);

char const *
month_day_to_jd(int m,int d);

void
unit_conversion (convert_type cv, double *the_double);

const char *
item_conversion (convert_type cv, const char * format, double the_double);

const char *
string_conversion (string_convert_type cv, const char * to_be_converted);

#endif