2003-02-08 19:18:01 +00:00
|
|
|
|
// -*- C++ -*-
|
|
|
|
|
/**
|
|
|
|
|
* \file lyxtime.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author John Levon
|
2005-07-05 09:01:52 +00:00
|
|
|
|
* \author J<EFBFBD>rgen Spitzm<EFBFBD>ller
|
2003-02-08 19:18:01 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-02-08 19:18:01 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef LYXTIME_H
|
|
|
|
|
#define LYXTIME_H
|
|
|
|
|
|
|
|
|
|
#include <time.h>
|
2005-07-05 09:01:52 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2003-02-08 19:18:01 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
|
typedef time_t time_type;
|
|
|
|
|
|
|
|
|
|
time_type current_time();
|
|
|
|
|
|
2005-07-05 09:01:52 +00:00
|
|
|
|
/** Returns a locale-dependent formatting of the date
|
|
|
|
|
* <EFBFBD>and time encoded in \c time. The \p fmt string
|
|
|
|
|
* holds the formatting arguments of \c strftime.
|
|
|
|
|
*/
|
|
|
|
|
std::string const formatted_time(time_type t, std::string const & fmt);
|
|
|
|
|
|
|
|
|
|
/** Returns a locale-dependent formatting of the date
|
|
|
|
|
* <EFBFBD>and time encoded in \c time. For the formatting,
|
|
|
|
|
* \c lyxrc.date_insert_format is being used.
|
|
|
|
|
*/
|
|
|
|
|
std::string const formatted_time(time_type t);
|
|
|
|
|
|
2003-02-08 19:18:01 +00:00
|
|
|
|
}; // namespace lyx
|
|
|
|
|
|
|
|
|
|
#endif // LYXTIME_H
|