/*  This file is part of lsnet.

    Lsnet is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Lsnet is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with lsnet.  If not, see <http://www.gnu.org/licenses/>.
*/


/*
        USAGE:
        int dates (char datestring[1000], int function)

        datestring is standard format asctime(local) ie: Sun Aug 23 06:41:20 PDT 2009

        function:
        0 return min since jan 1st 2009
        1 return month #
        2 return day #
        3 return hour
        4 return minutes
        5 return seconds
        6 return year
        7 return # of days in month

        all returns are integers
*/


#ifndef __DATES_H__
#define __DATES_H__ 1

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include  <sys/types.h>

//char datestring[1000];
int months1(char month[4]);
int months2(int monthnumber);
int hourhash(int hour1);
int ampm(int hourstring);
int months3(int month, int year);
int dates (char datestring[1000], int function);

#endif
