monotone

monotone Mtn Source Tree

Root/src/date_format.hh

1// Copyright (C) 2005 and later by various people
2// see monotone commit logs for details and authors
3//
4// This program is made available under the GNU GPL version 2.0 or
5// greater. See the accompanying file COPYING for details.
6//
7// This program is distributed WITHOUT ANY WARRANTY; without even the
8// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9// PURPOSE.
10
11#ifndef __DATE_FORMAT_HH__
12#define __DATE_FORMAT_HH__
13
14#include "options.hh"
15#include "lua_hooks.hh"
16#include "vocab.hh"
17
18inline std::string
19get_date_format(options const & opts,
20lua_hooks & lua,
21date_format_spec spec)
22{
23 std::string date_fmt;
24 if (!opts.no_format_dates)
25 {
26 if (!opts.date_fmt.empty())
27 date_fmt = opts.date_fmt;
28 else
29 lua.hook_get_date_format_spec(spec, date_fmt);
30 }
31 return date_fmt;
32}
33
34#endif
35
36// Local Variables:
37// mode: C++
38// fill-column: 76
39// c-file-style: "gnu"
40// indent-tabs-mode: nil
41// End:
42// vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s:

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status