#ifndef SHARED_CALENDAR_UTIL_H
#define SHARED_CALENDAR_UTIL_H

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "shared_util.h"
#include "../calendar.h"

int get_year_days(int year);
int get_month_days(int month, int year);
//char * get_month_name(int month);
int get_this_month_start_day(int year, int month );
void
get_pre_next(int year, int month, int *pre_year, int *pre_month, int *next_year, int *next_month);

void mk_conf(SESSION *user, CONFIG_STRUCT *conf);
void init_tm(struct tm *select, int year, int month, int today);

char *get_selected_timestring(struct tm *select);
void free_event_list(EVENT_NODE *head);
void set_selected_time(int selected_day, int year, int month);

void
set_hour_min(int hour, int min ,  char *hour_min_name,  char *am_name);

void get_previous_day(struct tm *realtime, int *year, int *month, int *day);
#endif
