jabberd2  2.2.16
util/datetime.h
Go to the documentation of this file.
00001 /*
00002  * jabberd - Jabber Open Source Server
00003  * Copyright (c) 2002-2004 Jeremie Miller, Thomas Muldowney,
00004  *                         Ryan Eatmon, Robert Norris
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111-1307USA
00019  */
00020 
00028 #ifndef INCL_UTIL_DATETIME_H
00029 #define INCL_UTIL_DATETIME_H 1
00030 
00031 #ifdef HAVE_CONFIG_H
00032 # include <config.h>
00033 #endif
00034 
00035 #include <time.h>
00036 
00037 /* jabberd2 Windows DLL */
00038 #ifndef JABBERD2_API
00039 # ifdef _WIN32
00040 #  ifdef JABBERD2_EXPORTS
00041 #   define JABBERD2_API  __declspec(dllexport)
00042 #  else /* JABBERD2_EXPORTS */
00043 #   define JABBERD2_API  __declspec(dllimport)
00044 #  endif /* JABBERD2_EXPORTS */
00045 # else /* _WIN32 */
00046 #  define JABBERD2_API extern
00047 # endif /* _WIN32 */
00048 #endif /* JABBERD2_API */
00049 
00050 typedef enum {
00051     dt_DATE     = 1,
00052     dt_TIME     = 2,
00053     dt_DATETIME = 3,
00054     dt_LEGACY   = 4
00055 } datetime_t;
00056 
00057 JABBERD2_API time_t  datetime_in(char *date);
00058 JABBERD2_API void    datetime_out(time_t t, datetime_t type, char *date, int datelen);
00059 
00060 #endif