diff options
author | Damon Chaplin <damon@ximian.com> | 2001-03-05 07:52:39 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-03-05 07:52:39 +0800 |
commit | 0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0 (patch) | |
tree | 58c452ceb2873d4bb4b1623c69d99b252d9e2ab0 /e-util/e-time-utils.h | |
parent | 601186a4edc390d85bcf56d7fb725dc3c76c6533 (diff) | |
download | gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar.gz gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar.bz2 gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar.lz gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar.xz gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.tar.zst gsoc2013-evolution-0a60162f0bd53bd2699e29b2604b7ecc8fb17ea0.zip |
new files to contain functions to parse and format dates and times for
2001-03-04 Damon Chaplin <damon@ximian.com>
* e-time-utils.[hc]: new files to contain functions to parse and
format dates and times for various calendar widgets.
svn path=/trunk/; revision=8546
Diffstat (limited to 'e-util/e-time-utils.h')
-rw-r--r-- | e-util/e-time-utils.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/e-util/e-time-utils.h b/e-util/e-time-utils.h new file mode 100644 index 0000000000..f6449a2f61 --- /dev/null +++ b/e-util/e-time-utils.h @@ -0,0 +1,35 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Time utility functions + * + * Author: + * Damon Chaplin (damon@ximian.com) + * + * (C) 2001 Ximian, Inc. + */ + +#ifndef E_TIME_UTILS +#define E_TIME_UTILS + +typedef enum { + E_TIME_PARSE_OK, + E_TIME_PARSE_NONE, + E_TIME_PARSE_INVALID +} ETimeParseStatus; + +/* Tries to parse a string containing a date and time. */ +ETimeParseStatus e_time_parse_date_and_time (const char *value, + struct tm *result); + +/* Tries to parse a string containing a time. */ +ETimeParseStatus e_time_parse_time (const char *value, + struct tm *result); + +/* Turns a struct tm into a string like "Wed 3/12/00 12:00:00 AM". */ +void e_time_format_date_and_time (struct tm *date_tm, + gboolean use_24_hour_format, + gboolean show_midnight, + gboolean show_zero_seconds, + char *result, + int result_size); +#endif /* E_TIME_UTILS */ |