xref: /AOO41X/main/cosv/source/service/datetime.cxx (revision 59617ebc85bcea0ed108b5abc0866206fd59a1f7)
1*59617ebcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*59617ebcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*59617ebcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*59617ebcSAndrew Rist  * distributed with this work for additional information
6*59617ebcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*59617ebcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*59617ebcSAndrew Rist  * "License"); you may not use this file except in compliance
9*59617ebcSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*59617ebcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*59617ebcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*59617ebcSAndrew Rist  * software distributed under the License is distributed on an
15*59617ebcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*59617ebcSAndrew Rist  * KIND, either express or implied.  See the License for the
17*59617ebcSAndrew Rist  * specific language governing permissions and limitations
18*59617ebcSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*59617ebcSAndrew Rist  *************************************************************/
21*59617ebcSAndrew Rist 
22*59617ebcSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <precomp.h>
26cdf0e10cSrcweir #include <cosv/datetime.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir 
29cdf0e10cSrcweir // NOT FULLY DECLARED SERVICES
30cdf0e10cSrcweir 
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace csv
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir 
Date()36cdf0e10cSrcweir Date::Date()
37cdf0e10cSrcweir 	:	nData( 0 )
38cdf0e10cSrcweir {
39cdf0e10cSrcweir }
40cdf0e10cSrcweir 
Date(unsigned i_nDay,unsigned i_nMonth,unsigned i_nYear)41cdf0e10cSrcweir Date::Date( unsigned 			i_nDay,
42cdf0e10cSrcweir 			unsigned 			i_nMonth,
43cdf0e10cSrcweir 			unsigned 			i_nYear )
44cdf0e10cSrcweir 	:	nData( (i_nDay << 24) + (i_nMonth << 16) + i_nYear )
45cdf0e10cSrcweir {
46cdf0e10cSrcweir }
47cdf0e10cSrcweir 
48cdf0e10cSrcweir const Date &
Null_()49cdf0e10cSrcweir Date::Null_()
50cdf0e10cSrcweir {
51cdf0e10cSrcweir 	static const Date C_DateNull_(0,0,0);
52cdf0e10cSrcweir 	return C_DateNull_;
53cdf0e10cSrcweir }
54cdf0e10cSrcweir 
55cdf0e10cSrcweir 
Time()56cdf0e10cSrcweir Time::Time()
57cdf0e10cSrcweir 	:	nData( 0 )
58cdf0e10cSrcweir {
59cdf0e10cSrcweir }
60cdf0e10cSrcweir 
Time(unsigned i_nHour,unsigned i_nMinutes,unsigned i_nSeconds,unsigned i_nSeconds100)61cdf0e10cSrcweir Time::Time( unsigned 			i_nHour,
62cdf0e10cSrcweir 			unsigned 			i_nMinutes,
63cdf0e10cSrcweir 			unsigned 			i_nSeconds,
64cdf0e10cSrcweir 			unsigned            i_nSeconds100 )
65cdf0e10cSrcweir 	:	nData( (i_nHour << 24) + (i_nMinutes << 16) + (i_nSeconds << 8) + i_nSeconds100 )
66cdf0e10cSrcweir {
67cdf0e10cSrcweir }
68cdf0e10cSrcweir 
69cdf0e10cSrcweir const Time &
Null_()70cdf0e10cSrcweir Time::Null_()
71cdf0e10cSrcweir {
72cdf0e10cSrcweir 	static const Time C_TimeNull_(0,0);
73cdf0e10cSrcweir 	return C_TimeNull_;
74cdf0e10cSrcweir }
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
78cdf0e10cSrcweir }   // namespace csv
79cdf0e10cSrcweir 
80cdf0e10cSrcweir 
81