|
Packit |
79f644 |
/*
|
|
Packit |
79f644 |
* Copyright (C) 2004 Imendio AB
|
|
Packit |
79f644 |
* Copyright (C) 2007-2012 Collabora Ltd.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
79f644 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
79f644 |
* License as published by the Free Software Foundation; either
|
|
Packit |
79f644 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
79f644 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
79f644 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
79f644 |
* Lesser General Public License for more details.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
79f644 |
* License along with this library; if not, write to the Free Software
|
|
Packit |
79f644 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
Packit |
79f644 |
*/
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#ifndef __TPAW_TIME_H__
|
|
Packit |
79f644 |
#define __TPAW_TIME_H__
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#ifndef __USE_XOPEN
|
|
Packit |
79f644 |
#define __USE_XOPEN
|
|
Packit |
79f644 |
#endif
|
|
Packit |
79f644 |
#include <time.h>
|
|
Packit |
79f644 |
#include <glib.h>
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_BEGIN_DECLS
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
/* FIXME: ideally we should only display the hour and minutes but
|
|
Packit |
79f644 |
* there is no localized format for that (bgo #668323) */
|
|
Packit |
79f644 |
#define TPAW_TIME_FORMAT_DISPLAY_SHORT "%X"
|
|
Packit |
79f644 |
#define TPAW_DATE_FORMAT_DISPLAY_SHORT "%a %d %b %Y"
|
|
Packit |
79f644 |
#define TPAW_TIME_DATE_FORMAT_DISPLAY_SHORT "%a %d %b %Y, %X"
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
gint64 tpaw_time_get_current (void);
|
|
Packit |
79f644 |
gchar *tpaw_time_to_string_utc (gint64 t,
|
|
Packit |
79f644 |
const gchar *format);
|
|
Packit |
79f644 |
gchar *tpaw_time_to_string_local (gint64 t,
|
|
Packit |
79f644 |
const gchar *format);
|
|
Packit |
79f644 |
gchar *tpaw_time_to_string_relative (gint64 t);
|
|
Packit |
79f644 |
gchar *tpaw_duration_to_string (guint seconds);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_END_DECLS
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#endif /* __TPAW_TIME_H__ */
|
|
Packit |
79f644 |
|