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