Loading...
Searching...
No Matches
FormatDate.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20/*!
21 \file terralib/se/FormatDate.h
22
23 \brief Date formatting function.
24*/
25
26#ifndef __TERRALIB_SE_INTERNAL_FORMATDATE_H
27#define __TERRALIB_SE_INTERNAL_FORMATDATE_H
28
29// TerraLib
30#include "Function.h"
31
32namespace te
33{
34 namespace se
35 {
36// Forward declaration
37 class ParameterValue;
38
39 /*!
40 \class FormatDate
41
42 \brief Date formatting function.
43
44 Function for dates.
45 This function is used for several date types.
46 The argument of the function can consist of
47 one of the following ISO 8601 XML schema types:
48 <ul>
49 <li>dateTime</li>
50 <li>time</li>
51 <li>date</li>
52 <li>gYearMonth</li>
53 <li>gMonthDay</li>
54 <li>gDay</li>
55 <li>gMonth</li>
56 <li>gYear</li>
57 <li>gml:TimeInstant</li>
58 </ul>
59 Standard output is as defined in ISO 8601: <b>YYYY-MM-DDThh:mm:ss</b>.
60
61 \sa Function, ParameterValue
62 */
64 {
65 public:
66
67 /** @name Initializer Methods
68 * Methods related to instantiation and destruction.
69 */
70 //@{
71
72 /*! \brief It initializes a new FormatDate. */
74
75 /*! \brief Destructor. */
77
78 //@}
79
80 /*
81 The Pattern is build-up of characters as follows:
82 <ul>
83 <li><b>YYYY:</b> Four digit year</li>
84 <li><b>YY:</b> Two digit year (without century and millennium)</li>
85 <li><b>MM:</b> Two digit month</li>
86 <li><b>M:</b> Month, leading zero omitted</li>
87 <li><b>MMM:</b> Month displayed by three letter acronym ("FEB"),
88 ISO 639 two-letter language codes as
89 defined by ISO 639 can be appended to
90 create language-dependent variants
91 (MMMde would yield "DEZ" instead of "DEC")</li>
92 <li><b>MMMMM:</b> for display of full month ("February").
93 The two-letter language code can be
94 appended (MMMMMde would result in 'Februar').</li>
95 <li><b>DD:</b> Two digit day</li>
96 <li><b>D:</b> Day, leading zero omitted</li>
97 <li><b>hh:</b> hour, h is used to omit a leading zero</li>
98 <li><b>mm:</b> minute, m is used to omit a leading zero</li>
99 <li><b>ss:</b> second, s is used to omit a leading zero</li>
100 <li><b>.:</b> point, will appear literally in the result</li>
101 <li><b>/:</b> slash, literally</li>
102 <li><b>::</b> colon. literally</li>
103 <li><b>-:</b> minus, literally</li>
104 <li><b>\:</b> backslash is employed to quote any character, which is to appear literally in the result.</li>
105 <li><b>a:</b> am/pm marker</li>
106 <li><b>z:</b> z: time zone (if present e.g. Pacific Standard Time; PST; GMT-08:00)</li>
107 </ul>
108 */
110 void setPattern(const std::string& p);
111
112 private:
113
114 /** @name Not Allowed Methods
115 * No copy allowed.
116 */
117 //@{
118
119 /*!
120 \brief No copy constructor allowed.
121
122 \param rhs The other object.
123 */
125
126 /*!
127 \brief No assignment operator allowed.
128
129 \param rhs The other object.
130
131 \return A reference for this.
132 */
134
135 //@}
136
137 private:
138
139 ParameterValue* m_dateValue; //!< Mandatory.
140 std::string m_pattern; //!< Mandatory.
141 };
142
143 } // end namespace se
144} // end namespace te
145
146#endif // __TERRALIB_SE_INTERNAL_FORMATDATE_H
Date formatting function.
Definition: FormatDate.h:64
void setPattern(const std::string &p)
~FormatDate()
Destructor.
FormatDate(const FormatDate &rhs)
No copy constructor allowed.
std::string m_pattern
Mandatory.
Definition: FormatDate.h:140
void setDateValue(ParameterValue *v)
FormatDate()
It initializes a new FormatDate.
ParameterValue * m_dateValue
Mandatory.
Definition: FormatDate.h:139
FormatDate & operator=(const FormatDate &rhs)
No assignment operator allowed.
Symbology Encoding functions.
Definition: Function.h:66
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters.
TerraLib.
Symbology Encoding functions.
#define TESEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:201