Ignore:
Timestamp:
12/10/14 14:27:09 (9 years ago)
Author:
rlacroix
Message:

Add a new attribute type for dates and use it for the context's start_date and time_origin.

The "xios_date" type should now be used to get/set date attributes through the Fortran interface. This avoids using strings to manipulate dates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/date/gregorian.cpp

    r501 r532  
    55      /// ////////////////////// Définitions ////////////////////// /// 
    66 
    7       CGregorianCalendar::CGregorianCalendar(const StdString & dateStr) 
    8          : CCalendar("Gregorian") 
    9       { initializeDate(dateStr); } 
     7      CGregorianCalendar::CGregorianCalendar(const CDate& startDate) 
     8         : CCalendar("Gregorian", startDate) 
     9      { 
     10         // This will check that the dates are conform with the calendar. 
     11         // We cannot call this from the parent constructor because we 
     12         // want the methods of this class to be used 
     13         initializeDate(); 
     14      } 
    1015 
    11       CGregorianCalendar::CGregorianCalendar(const StdString & dateStr,const StdString & timeOriginStr) 
    12          : CCalendar("Gregorian") 
    13       { initializeDate(dateStr, timeOriginStr); } 
     16      CGregorianCalendar::CGregorianCalendar(const CDate& startDate, const CDate& timeOrigin) 
     17         : CCalendar("Gregorian", startDate, timeOrigin) 
     18      { 
     19         // This will check that the dates are conform with the calendar. 
     20         // We cannot call this from the parent constructor because we 
     21         // want the methods of this class to be used 
     22         initializeDate(); 
     23      } 
    1424 
    1525      CGregorianCalendar::CGregorianCalendar(int yr, int mth, int d, 
Note: See TracChangeset for help on using the changeset viewer.