Index: XIOS/trunk/src/interface/c/iccalendar.cpp
===================================================================
--- XIOS/trunk/src/interface/c/iccalendar.cpp	(revision 545)
+++ XIOS/trunk/src/interface/c/iccalendar.cpp	(revision 545)
@@ -0,0 +1,28 @@
+#include "xmlioserver.hpp"
+
+#include "exception.hpp"
+#include "timer.hpp"
+#include "context.hpp"
+#include "context_client.hpp"
+
+extern "C"
+{
+  void cxios_create_calendar()
+  {
+    CTimer::get("XIOS").resume();
+    xios::CContext* context = CContext::getCurrent();
+    if (context->hasClient)
+      context->solveCalendar();
+    CTimer::get("XIOS").suspend();
+  }
+
+  void cxios_update_calendar(int step)
+  {
+    CTimer::get("XIOS").resume();
+    xios::CContext* context = CContext::getCurrent();
+    if (!context->hasServer) context->client->checkBuffers();
+    context->updateCalendar(step);
+    context->sendUpdateCalendar(step);
+    CTimer::get("XIOS").suspend();
+  }
+}
Index: XIOS/trunk/src/interface/c/iccontext.cpp
===================================================================
--- XIOS/trunk/src/interface/c/iccontext.cpp	(revision 541)
+++ XIOS/trunk/src/interface/c/iccontext.cpp	(revision 545)
@@ -29,11 +29,11 @@
 
    // ------------------------ CrÃ©ation des handle -----------------------------
-   
+
    void cxios_context_handle_create (XContextPtr * _ret, const char * _id, int _id_len)
    {
-      std::string id; 
+      std::string id;
       if (!cstr2string(_id, _id_len, id)) return;
       CTimer::get("XIOS").resume() ;
-      
+
       std::vector<xios::CContext*> def_vector =
             xios::CContext::getRoot()->getChildList();
@@ -53,7 +53,14 @@
       // Lever une exeception ici
    }
-   
+
    // ------------------------ Changements de contextes ------------------------
-   
+
+   void cxios_context_get_current(XContextPtr* context)
+   {
+      CTimer::get("XIOS").resume();
+      *context = CContext::getCurrent();
+      CTimer::get("XIOS").suspend();
+   }
+
    void cxios_context_set_current(XContextPtr context, bool withswap)
    {
@@ -62,6 +69,5 @@
       CTimer::get("XIOS").suspend() ;
    }
-   
- 
+
    // -------------------- VÃ©rification des identifiants -----------------------
 
@@ -70,5 +76,5 @@
       std::string id;
       if (!cstr2string(_id, _id_len, id)) return;
-      
+
       CTimer::get("XIOS").resume();
       std::vector<xios::CContext*> def_vector =
Index: XIOS/trunk/src/interface/c/icdate.cpp
===================================================================
--- XIOS/trunk/src/interface/c/icdate.cpp	(revision 541)
+++ XIOS/trunk/src/interface/c/icdate.cpp	(revision 545)
@@ -15,21 +15,132 @@
 
 #include "icutil.hpp"
+#include "icdate.hpp"
+#include "exception.hpp"
+#include "calendar_util.hpp"
 #include "timer.hpp"
 #include "context.hpp"
 #include "context_client.hpp"
 
+static const xios::CCalendar& getCalendar(const std::string& idFunc)
+{
+  const xios::CContext* context = CContext::getCurrent();
+  if (!context)
+    ERROR(idFunc, << "Impossible to do calendar operations: no current context available.");
+  const boost::shared_ptr<xios::CCalendar> cal = context->getCalendar();
+  if (!cal)
+    ERROR(idFunc, << "Impossible to do calendar operations: no calendar was defined.");
+  return *cal;
+}
+
 extern "C"
 {
-// /////////////////////////////// DÃ©finitions ////////////////////////////// //
+  long long int cxios_date_convert_to_seconds(cxios_date date_c)
+  {
+    xios::CDate date = xios::CDate(getCalendar("long long int cxios_date_convert_to_seconds(cxios_date date_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    return date;
+  }
 
-   void cxios_update_calendar(int step)
-   {
-      CTimer::get("XIOS").resume() ;
-      xios::CContext* context = CContext::getCurrent() ;
-      if (!context->hasServer) context->client->checkBuffers() ;
-      context->updateCalendar(step) ;
-      context->sendUpdateCalendar(step) ;
-      CTimer::get("XIOS").suspend() ;
-   }
+  cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c)
+  {
+    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_add_duration(cxios_date date_c, cxios_duration dur_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day,
+                            dur_c.hour, dur_c.minute, dur_c.second,
+                            dur_c.timestep };
+    xios::CDate res = date + dur;
+    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() };
+  }
 
+  cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c)
+  {
+    xios::CDate date = xios::CDate(getCalendar("cxios_date cxios_date_sub_duration(cxios_date date_c, cxios_duration dur_c)"),
+                                   date_c.year, date_c.month, date_c.day,
+                                   date_c.hour, date_c.minute, date_c.second);
+    xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day,
+                            dur_c.hour, dur_c.minute, dur_c.second,
+                            dur_c.timestep };
+    xios::CDate res = date - dur;
+    return { res.getYear(), res.getMonth(), res.getDay(), res.getHour(), res.getMinute(), res.getSecond() };
+  }
+
+  cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("cxios_duration cxios_date_sub(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    xios::CDuration res = date1 - date2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+
+  bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 == date2);
+  }
+
+  bool cxios_date_neq(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 != date2);
+  }
+
+  bool cxios_date_lt(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 < date2);
+  }
+
+  bool cxios_date_le(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 <= date2);
+  }
+
+  bool cxios_date_gt(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 > date2);
+  }
+
+  bool cxios_date_ge(cxios_date date1_c, cxios_date date2_c)
+  {
+    xios::CDate date1 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date1_c.year, date1_c.month, date1_c.day,
+                                    date1_c.hour, date1_c.minute, date1_c.second);
+    xios::CDate date2 = xios::CDate(getCalendar("bool cxios_date_eq(cxios_date date1_c, cxios_date date2_c)"),
+                                    date2_c.year, date2_c.month, date2_c.day,
+                                    date2_c.hour, date2_c.minute, date2_c.second);
+    return (date1 >= date2);
+  }
 } // extern "C"
Index: XIOS/trunk/src/interface/c/icduration.cpp
===================================================================
--- XIOS/trunk/src/interface/c/icduration.cpp	(revision 545)
+++ XIOS/trunk/src/interface/c/icduration.cpp	(revision 545)
@@ -0,0 +1,69 @@
+#include "icdate.hpp"
+#include "calendar_util.hpp"
+
+extern "C"
+{
+  cxios_duration cxios_duration_add(cxios_duration dur1_c, cxios_duration dur2_c)
+  {
+    xios::CDuration dur1 = { dur1_c.year, dur1_c.month, dur1_c.day,
+                             dur1_c.hour, dur1_c.minute, dur1_c.second,
+                             dur1_c.timestep };
+    xios::CDuration dur2 = { dur2_c.year, dur2_c.month, dur2_c.day,
+                             dur2_c.hour, dur2_c.minute, dur2_c.second,
+                             dur2_c.timestep };
+    xios::CDuration res = dur1 + dur2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+
+  cxios_duration cxios_duration_sub(cxios_duration dur1_c, cxios_duration dur2_c)
+  {
+    xios::CDuration dur1 = { dur1_c.year, dur1_c.month, dur1_c.day,
+                             dur1_c.hour, dur1_c.minute, dur1_c.second,
+                             dur1_c.timestep };
+    xios::CDuration dur2 = { dur2_c.year, dur2_c.month, dur2_c.day,
+                             dur2_c.hour, dur2_c.minute, dur2_c.second,
+                             dur2_c.timestep };
+    xios::CDuration res = dur1 - dur2;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+
+  cxios_duration cxios_duration_mult(double val, cxios_duration dur_c)
+  {
+    xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day,
+                            dur_c.hour, dur_c.minute, dur_c.second,
+                            dur_c.timestep };
+    xios::CDuration res = val * dur;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+
+  cxios_duration cxios_duration_neg(cxios_duration dur_c)
+  {
+    xios::CDuration dur = { dur_c.year, dur_c.month, dur_c.day,
+                            dur_c.hour, dur_c.minute, dur_c.second,
+                            dur_c.timestep };
+    xios::CDuration res = -dur;
+    return { res.year, res.month, res.day, res.hour, res.minute, res.second, res.timestep };
+  }
+
+  bool cxios_duration_eq(cxios_duration dur1_c, cxios_duration dur2_c)
+  {
+    xios::CDuration dur1 = { dur1_c.year, dur1_c.month, dur1_c.day,
+                             dur1_c.hour, dur1_c.minute, dur1_c.second,
+                             dur1_c.timestep };
+    xios::CDuration dur2 = { dur2_c.year, dur2_c.month, dur2_c.day,
+                             dur2_c.hour, dur2_c.minute, dur2_c.second,
+                             dur2_c.timestep };
+    return (dur1 == dur2);
+  }
+
+  bool cxios_duration_neq(cxios_duration dur1_c, cxios_duration dur2_c)
+  {
+    xios::CDuration dur1 = { dur1_c.year, dur1_c.month, dur1_c.day,
+                             dur1_c.hour, dur1_c.minute, dur1_c.second,
+                             dur1_c.timestep };
+    xios::CDuration dur2 = { dur2_c.year, dur2_c.month, dur2_c.day,
+                             dur2_c.hour, dur2_c.minute, dur2_c.second,
+                             dur2_c.timestep };
+    return (dur1 != dur2);
+  }
+}
Index: XIOS/trunk/src/interface/fortran/calendar_interface.f90
===================================================================
--- XIOS/trunk/src/interface/fortran/calendar_interface.f90	(revision 545)
+++ XIOS/trunk/src/interface/fortran/calendar_interface.f90	(revision 545)
@@ -0,0 +1,16 @@
+MODULE CALENDAR_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      SUBROUTINE cxios_create_calendar() BIND(C)
+      END SUBROUTINE cxios_create_calendar
+
+      SUBROUTINE cxios_update_calendar(step) BIND(C)
+         IMPORT C_INT
+         INTEGER (kind = C_INT), VALUE :: step
+      END SUBROUTINE cxios_update_calendar
+
+   END INTERFACE
+     
+END MODULE CALENDAR_INTERFACE
Index: XIOS/trunk/src/interface/fortran/context_interface.f90
===================================================================
--- XIOS/trunk/src/interface/fortran/context_interface.f90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/context_interface.f90	(revision 545)
@@ -1,7 +1,7 @@
 MODULE CONTEXT_INTERFACE
    USE, INTRINSIC :: ISO_C_BINDING
-     
+
    INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
-     
+
       SUBROUTINE cxios_context_handle_create(ret, idt, idt_size) BIND(C)
          import C_CHAR, C_INTPTR_T, C_INT
@@ -10,5 +10,10 @@
          INTEGER  (kind = C_INT)     , VALUE        :: idt_size
       END SUBROUTINE cxios_context_handle_create
-      
+
+      SUBROUTINE cxios_context_get_current(context) BIND(C)
+         import C_INTPTR_T
+         INTEGER (kind = C_INTPTR_T) :: context
+      END SUBROUTINE cxios_context_get_current
+
       SUBROUTINE cxios_context_set_current(context, withswap) BIND(C)
          import C_BOOL, C_INT, C_INTPTR_T
@@ -25,4 +30,4 @@
 
    END INTERFACE
-     
+
 END MODULE CONTEXT_INTERFACE
Index: XIOS/trunk/src/interface/fortran/date_interface.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/date_interface.F90	(revision 545)
+++ XIOS/trunk/src/interface/fortran/date_interface.F90	(revision 545)
@@ -0,0 +1,79 @@
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE DATE_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   TYPE, BIND(C) :: txios(date)
+      INTEGER(kind = C_INT) :: year, month, day, hour, minute, second
+   END TYPE txios(date)
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      INTEGER(kind = C_LONG_LONG) FUNCTION cxios_date_convert_to_seconds(date) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+      END FUNCTION cxios_date_convert_to_seconds
+
+      TYPE(txios(date)) FUNCTION cxios_date_add_duration(date, dur) BIND(C)
+         USE ISO_C_BINDING
+         USE IDURATION, only : txios(duration)
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_date_add_duration
+
+      TYPE(txios(date)) FUNCTION cxios_date_sub_duration(date, dur) BIND(C)
+         USE ISO_C_BINDING
+         USE IDURATION, only : txios(duration)
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_date_sub_duration
+
+      TYPE(txios(duration)) FUNCTION cxios_date_sub(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         USE IDURATION, only : txios(duration)
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_sub
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_eq(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_eq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_neq(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_neq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_lt(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_lt
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_le(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_le
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_gt(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_gt
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_date_ge(date1, date2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(date)
+         TYPE(txios(date)), VALUE :: date1, date2
+      END FUNCTION cxios_date_ge
+
+   END INTERFACE
+     
+END MODULE DATE_INTERFACE
Index: XIOS/trunk/src/interface/fortran/duration_interface.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/duration_interface.F90	(revision 545)
+++ XIOS/trunk/src/interface/fortran/duration_interface.F90	(revision 545)
@@ -0,0 +1,51 @@
+#include "../fortran/xios_fortran_prefix.hpp"
+
+MODULE DURATION_INTERFACE
+   USE, INTRINSIC :: ISO_C_BINDING
+
+   TYPE, BIND(C) :: txios(duration)
+      REAL(kind = C_DOUBLE) :: year=0, month=0, day=0, hour=0, minute=0, second=0, timestep=0
+   END TYPE txios(duration)
+     
+   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_add(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_add
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_sub(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_sub
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_mult(val, dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         REAL(kind = C_DOUBLE), VALUE :: val
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_duration_mult
+
+      TYPE(txios(duration)) FUNCTION cxios_duration_neg(dur) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur
+      END FUNCTION cxios_duration_neg
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_duration_eq(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_eq
+
+      LOGICAL(kind = C_BOOL) FUNCTION cxios_duration_neq(dur1, dur2) BIND(C)
+         USE ISO_C_BINDING
+         IMPORT :: txios(duration)
+         TYPE(txios(duration)), VALUE :: dur1, dur2
+      END FUNCTION cxios_duration_neq
+
+   END INTERFACE
+     
+END MODULE DURATION_INTERFACE
Index: XIOS/trunk/src/interface/fortran/icalendar.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/icalendar.F90	(revision 545)
+++ XIOS/trunk/src/interface/fortran/icalendar.F90	(revision 545)
@@ -0,0 +1,67 @@
+#include "xios_fortran_prefix.hpp"
+MODULE ICALENDAR
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE CALENDAR_INTERFACE
+   USE IDATE
+   USE IDURATION
+
+   ! enum XCalendarType
+   INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
+
+   CONTAINS ! Fonctions disponibles pour les utilisateurs.
+
+   SUBROUTINE xios(set_calendar)(calendar_type, start_date, time_origin, timestep)
+      USE ICONTEXT, ONLY : txios(context), xios(get_current_context)
+      USE icontext_attr, ONLY : xios(set_context_attr_hdl)
+      USE IDATE, ONLY : txios(date)
+      USE IDURATION, ONLY : txios(duration)
+      IMPLICIT NONE
+      CHARACTER(len = *),    OPTIONAL, INTENT(IN) :: calendar_type
+      TYPE(txios(date)),     OPTIONAL, INTENT(IN) :: start_date
+      TYPE(txios(date)),     OPTIONAL, INTENT(IN) :: time_origin
+      TYPE(txios(duration)), OPTIONAL, INTENT(IN) :: timestep
+      TYPE(txios(context)) :: context
+
+      CALL xios(get_current_context)(context)
+
+      IF (PRESENT(calendar_type)) THEN
+         CALL xios(set_context_attr_hdl)(context, calendar_type=calendar_type)
+      END IF
+      IF (PRESENT(start_date)) THEN
+         CALL xios(set_context_attr_hdl)(context, start_date=start_date)
+      END IF
+      IF (PRESENT(time_origin)) THEN
+         CALL xios(set_context_attr_hdl)(context, time_origin=time_origin)
+      END IF
+      IF (PRESENT(time_origin)) THEN
+         CALL xios(set_context_attr_hdl)(context, timestep=timestep)
+      END IF
+
+      CALL cxios_create_calendar()
+   END SUBROUTINE xios(set_calendar)
+
+   SUBROUTINE xios(set_timestep)(timestep)
+      USE ICONTEXT, ONLY : txios(context), xios(get_current_context)
+      USE icontext_attr, ONLY : xios(set_context_attr_hdl)
+      USE IDURATION, ONLY : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: timestep
+      TYPE(txios(context)) :: context
+
+      CALL xios(get_current_context)(context)
+
+      CALL xios(set_context_attr_hdl)(context, timestep=timestep)
+   END SUBROUTINE xios(set_timestep)
+
+   SUBROUTINE xios(update_calendar)(step)
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: step
+      
+      IF (step < 0) THEN
+         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif"
+         STOP
+      END IF
+      CALL cxios_update_calendar(step)
+   END SUBROUTINE xios(update_calendar)
+
+END MODULE ICALENDAR
Index: XIOS/trunk/src/interface/fortran/icontext.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/icontext.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/icontext.F90	(revision 545)
@@ -4,23 +4,33 @@
    USE, INTRINSIC :: ISO_C_BINDING
    USE CONTEXT_INTERFACE
+   USE IDATE
+   USE IDURATION
 !   USE icontext_attr
-   USE IDATE
 
-    
+
    TYPE txios(context)
       INTEGER(kind = C_INTPTR_T) :: daddr
    END TYPE txios(context)
-      
-   
+
+
    CONTAINS ! Fonctions disponibles pour les utilisateurs.
-   
+
    SUBROUTINE xios(get_context_handle)(idt,ret)
       IMPLICIT NONE
-      CHARACTER(len = *)  , INTENT(IN)  :: idt      
+      CHARACTER(len = *)  , INTENT(IN)  :: idt
       TYPE(txios(context)), INTENT(OUT):: ret
 
-      CALL cxios_context_handle_create(ret%daddr, idt, len(idt))            
+      CALL cxios_context_handle_create(ret%daddr, idt, len(idt))
    END SUBROUTINE xios(get_context_handle)
-   
+
+   SUBROUTINE xios(get_current_context)(context)
+      IMPLICIT NONE
+
+      TYPE(txios(context)), INTENT(IN) :: context
+
+      CALL cxios_context_get_current(context%daddr)
+
+   END SUBROUTINE xios(get_current_context)
+
    SUBROUTINE xios(set_current_context)(context, withswap)
       IMPLICIT NONE
@@ -28,5 +38,5 @@
       TYPE(txios(context))          , INTENT(IN) :: context
       LOGICAL             , OPTIONAL, INTENT(IN) :: withswap
-      LOGICAL (kind = 1)                       :: wswap
+      LOGICAL (kind = 1)                         :: wswap
 
       IF (PRESENT(withswap)) THEN
@@ -38,5 +48,5 @@
 
    END SUBROUTINE xios(set_current_context)
- 
+
    LOGICAL FUNCTION xios(is_valid_context)(idt)
       IMPLICIT NONE
@@ -49,4 +59,4 @@
    END FUNCTION  xios(is_valid_context)
 
-   
+
 END MODULE ICONTEXT
Index: XIOS/trunk/src/interface/fortran/idate.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/idate.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/idate.F90	(revision 545)
@@ -2,37 +2,141 @@
 MODULE IDATE
    USE, INTRINSIC :: ISO_C_BINDING
+   USE DATE_INTERFACE
 
-   ! enum XCalendarType
-   INTEGER(kind = C_INT), PARAMETER :: D360 = 0 , ALLLEAP = 1 , NOLEAP = 2 , JULIAN = 3 , GREGORIAN = 4
+   INTERFACE OPERATOR(+)
+      MODULE PROCEDURE xios(date_add_duration)
+   END INTERFACE
 
-   TYPE, BIND(C) :: txios(date)
-      INTEGER(kind = C_INT) :: year, month, day, hour, minute, second
-   END TYPE txios(date)
+   INTERFACE OPERATOR(-)
+      MODULE PROCEDURE xios(date_sub_duration)
+      MODULE PROCEDURE xios(date_sub)
+   END INTERFACE
 
-   TYPE, BIND(C) :: txios(duration)
-      REAL(kind = C_DOUBLE) :: year=0, month=0, day=0, hour=0, minute=0, second=0, timestep=0
-   END TYPE txios(duration)
+   INTERFACE OPERATOR(==)
+      MODULE PROCEDURE xios(date_eq)
+   END INTERFACE
 
-   INTERFACE ! Ne pas appeler directement/Interface FORTRAN 2003 <-> C99
+   INTERFACE OPERATOR(/=)
+      MODULE PROCEDURE xios(date_neq)
+   END INTERFACE
 
-      SUBROUTINE cxios_update_calendar(step) BIND(C)
-         IMPORT C_INT
-         INTEGER (kind = C_INT), VALUE :: step
-      END SUBROUTINE cxios_update_calendar
+   INTERFACE OPERATOR(<)
+      MODULE PROCEDURE xios(date_lt)
+   END INTERFACE
 
+   INTERFACE OPERATOR(<=)
+      MODULE PROCEDURE xios(date_le)
    END INTERFACE
-   
+
+   INTERFACE OPERATOR(>)
+      MODULE PROCEDURE xios(date_gt)
+   END INTERFACE
+
+   INTERFACE OPERATOR(>=)
+      MODULE PROCEDURE xios(date_ge)
+   END INTERFACE
+
    CONTAINS ! Fonctions disponibles pour les utilisateurs.
 
-   SUBROUTINE xios(update_calendar)(step)
-     IMPLICIT NONE
-     INTEGER, INTENT(IN):: step
-      
-      IF (step < 0) THEN
-         PRINT *, "L'argument 'step' ne peut Ãªtre nÃ©gatif"
-         STOP
-      END IF
-      CALL cxios_update_calendar(step)
-   END SUBROUTINE xios(update_calendar)
+   FUNCTION xios(date_convert_to_seconds)(date) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      INTEGER(kind = C_LONG_LONG) :: res
+
+      res = cxios_date_convert_to_seconds(date)
+   END FUNCTION xios(date_convert_to_seconds)
+
+   ! Addition: date + duration = date
+
+   FUNCTION xios(date_add_duration)(date, dur) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(date)) :: res
+
+      res = cxios_date_add_duration(date, dur)
+   END FUNCTION xios(date_add_duration)
+
+   ! Subtraction: date - duration = date
+
+   FUNCTION xios(date_sub_duration)(date, dur) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(date)) :: res
+
+      res = cxios_date_sub_duration(date, dur)
+   END FUNCTION xios(date_sub_duration)
+
+   ! Subtraction: date - date = duration
+
+   FUNCTION xios(date_sub)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      USE IDURATION, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_date_sub(date1, date2)
+   END FUNCTION xios(date_sub)
+
+   FUNCTION xios(date_eq)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_eq(date1, date2)
+   END FUNCTION xios(date_eq)
+
+   FUNCTION xios(date_neq)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_neq(date1, date2)
+   END FUNCTION xios(date_neq)
+
+   FUNCTION xios(date_lt)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_lt(date1, date2)
+   END FUNCTION xios(date_lt)
+
+   FUNCTION xios(date_le)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_le(date1, date2)
+   END FUNCTION xios(date_le)
+
+   FUNCTION xios(date_gt)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_gt(date1, date2)
+   END FUNCTION xios(date_gt)
+
+   FUNCTION xios(date_ge)(date1, date2) RESULT(res)
+      USE DATE_INTERFACE, only : txios(date)
+      IMPLICIT NONE
+      TYPE(txios(date)), INTENT(IN) :: date1, date2
+      LOGICAL :: res
+
+      res = cxios_date_ge(date1, date2)
+   END FUNCTION xios(date_ge)
 
 END MODULE IDATE
Index: XIOS/trunk/src/interface/fortran/iduration.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/iduration.F90	(revision 545)
+++ XIOS/trunk/src/interface/fortran/iduration.F90	(revision 545)
@@ -0,0 +1,171 @@
+#include "xios_fortran_prefix.hpp"
+
+MODULE IDURATION
+   USE, INTRINSIC :: ISO_C_BINDING
+   USE DURATION_INTERFACE
+
+   TYPE(txios(duration)), PARAMETER :: xios(year) = txios(duration)(1, 0, 0, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(month) = txios(duration)(0, 1, 0, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(day) = txios(duration)(0, 0, 1, 0, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(hour) = txios(duration)(0, 0, 0, 1, 0, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(minute) = txios(duration)(0, 0, 0, 0, 1, 0, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(second) = txios(duration)(0, 0, 0, 0, 0, 1, 0)
+   TYPE(txios(duration)), PARAMETER :: xios(timestep) = txios(duration)(0, 0, 0, 0, 0, 0, 1)
+
+   INTERFACE OPERATOR(+)
+      MODULE PROCEDURE xios(duration_add)
+   END INTERFACE
+
+   INTERFACE OPERATOR(-)
+      MODULE PROCEDURE xios(duration_sub)
+      MODULE PROCEDURE xios(duration_neg)
+   END INTERFACE
+
+   INTERFACE OPERATOR(*)
+      MODULE PROCEDURE xios(real4_duration_mult)
+      MODULE PROCEDURE xios(duration_real4_mult)
+      MODULE PROCEDURE xios(real8_duration_mult)
+      MODULE PROCEDURE xios(duration_real8_mult)
+      MODULE PROCEDURE xios(int_duration_mult)
+      MODULE PROCEDURE xios(duration_int_mult)
+   END INTERFACE
+
+   INTERFACE xios(duration_mult)
+      MODULE PROCEDURE xios(real4_duration_mult)
+      MODULE PROCEDURE xios(duration_real4_mult)
+      MODULE PROCEDURE xios(real8_duration_mult)
+      MODULE PROCEDURE xios(duration_real8_mult)
+      MODULE PROCEDURE xios(int_duration_mult)
+      MODULE PROCEDURE xios(duration_int_mult)
+   END INTERFACE
+
+   INTERFACE OPERATOR(==)
+      MODULE PROCEDURE xios(duration_eq)
+   END INTERFACE
+
+   INTERFACE OPERATOR(/=)
+      MODULE PROCEDURE xios(duration_neq)
+   END INTERFACE
+
+   CONTAINS
+
+   ! Addition
+
+   FUNCTION xios(duration_add)(dur1, dur2) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_add(dur1, dur2)
+   END FUNCTION xios(duration_add)
+
+   ! Subtraction
+
+   FUNCTION xios(duration_sub)(dur1, dur2) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_sub(dur1, dur2)
+   END FUNCTION xios(duration_sub)
+
+   ! Multiplication by a scalar
+   
+   FUNCTION xios(real4_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      REAL(kind = C_FLOAT), INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val, C_DOUBLE), dur)
+   END FUNCTION xios(real4_duration_mult)
+   
+   FUNCTION xios(duration_real4_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      REAL(kind = C_FLOAT), INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val2, C_DOUBLE), dur)
+   END FUNCTION xios(duration_real4_mult)
+   
+   FUNCTION xios(real8_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      REAL(kind = C_DOUBLE), INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(val, dur)
+   END FUNCTION xios(real8_duration_mult)
+   
+   FUNCTION xios(duration_real8_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      REAL(kind = C_DOUBLE), INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(val2, dur)
+   END FUNCTION xios(duration_real8_mult)
+   
+   FUNCTION xios(int_duration_mult)(val, dur) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: val
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val, C_DOUBLE), dur)
+   END FUNCTION xios(int_duration_mult)
+   
+   FUNCTION xios(duration_int_mult)(dur, val2) RESULT(res)
+      USE ISO_C_BINDING
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      INTEGER, INTENT(IN) :: val2
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_mult(REAL(val2, C_DOUBLE), dur)
+   END FUNCTION xios(duration_int_mult)
+
+   ! Negation
+
+   FUNCTION xios(duration_neg)(dur) RESULT(res)
+      USE DURATION_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur
+      TYPE(txios(duration)) :: res
+
+      res = cxios_duration_neg(dur)
+   END FUNCTION xios(duration_neg)
+
+   FUNCTION xios(duration_eq)(dur1, dur2) RESULT(res)
+      USE duration_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      LOGICAL :: res
+
+      res = cxios_duration_eq(dur1, dur2)
+   END FUNCTION xios(duration_eq)
+
+   FUNCTION xios(duration_neq)(dur1, dur2) RESULT(res)
+      USE duration_INTERFACE, only : txios(duration)
+      IMPLICIT NONE
+      TYPE(txios(duration)), INTENT(IN) :: dur1, dur2
+      LOGICAL :: res
+
+      res = cxios_duration_neq(dur1, dur2)
+   END FUNCTION xios(duration_neq)
+
+END MODULE IDURATION
Index: XIOS/trunk/src/interface/fortran/ifield.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ifield.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/ifield.F90	(revision 545)
@@ -7,5 +7,5 @@
 !   USE IFIELD_ATTR
 !   USE IFIELDGROUP_ATTR
-   USE IDATE
+   USE IDURATION
    
    TYPE txios(field)
Index: XIOS/trunk/src/interface/fortran/ifile.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ifile.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/ifile.F90	(revision 545)
@@ -7,5 +7,5 @@
 !   USE IFILE_ATTR
 !   USE IFILEGROUP_ATTR
-   USE IDATE
+   USE IDURATION
    
    TYPE txios(file)
Index: XIOS/trunk/src/interface/fortran/ixios.F90
===================================================================
--- XIOS/trunk/src/interface/fortran/ixios.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran/ixios.F90	(revision 545)
@@ -3,4 +3,5 @@
 MODULE XIOS
 
+USE icalendar, ONLY : xios(set_calendar), xios(set_timestep), xios(update_calendar)
 
 USE icontext, ONLY : txios(context), xios(get_context_handle), xios(set_current_context),    &
@@ -19,5 +20,10 @@
                   xios(setVar_logic), xios(setVar_char)
 
-USE idate, ONLY : txios(date), txios(duration), xios(update_calendar)
+USE idate, ONLY : txios(date), &
+                  xios(date_convert_to_seconds), &
+                  xios(date_add_duration), xios(date_sub_duration), xios(date_sub), &
+                  xios(date_eq), xios(date_neq), xios(date_lt), xios(date_le), xios(date_gt), xios(date_ge), &
+                  OPERATOR(+), OPERATOR(-), &
+                  OPERATOR(==), OPERATOR(/=), OPERATOR(<), OPERATOR(<=), OPERATOR(>), OPERATOR(>=)
 
 USE idomain, ONLY : txios(domain), txios(domaingroup), xios(get_domain_handle),  &
@@ -32,4 +38,10 @@
                               xios(get_domaingroup_attr), xios(get_domaingroup_attr_hdl), &
                               xios(is_defined_domaingroup_attr), xios(is_defined_domaingroup_attr_hdl)
+
+USE iduration, ONLY: txios(duration), &
+                     xios(year), xios(month), xios(day), xios(hour), xios(minute), xios(second), xios(timestep), &
+                     xios(duration_add), xios(duration_sub), xios(duration_mult), xios(duration_neg), &
+                     xios(duration_eq), xios(duration_neq), &
+                     OPERATOR(+), OPERATOR(-), OPERATOR(*)
 
 USE ifield, ONLY : txios(field), txios(fieldgroup), xios(get_field_handle),  &
@@ -184,9 +196,21 @@
 
  PUBLIC :: xios(set_current_context)
- PUBLIC :: xios(update_calendar)
  PUBLIC :: xios(initialize), xios(init_server), xios(finalize), xios(context_initialize),xios(context_is_initialized), &
            xios(solve_inheritance), xios(close_context_definition), xios(context_finalize), xios(send_field),          &
            xios(field_is_active)
 
+ PUBLIC :: xios(set_calendar), xios(set_timestep), xios(update_calendar)
+
+ PUBLIC :: xios(year), xios(month), xios(day), xios(hour), xios(minute), xios(second), xios(timestep), &
+           xios(duration_add), xios(duration_sub), xios(duration_mult), xios(duration_neg), &
+           xios(duration_eq), xios(duration_neq)
+
+ PUBLIC :: xios(date_convert_to_seconds), &
+           xios(date_add_duration), xios(date_sub_duration), xios(date_sub), &
+           xios(date_eq), xios(date_neq), xios(date_lt), xios(date_le), xios(date_gt), xios(date_ge)
+
+ PUBLIC :: OPERATOR(+), OPERATOR(-), OPERATOR(*), &
+           OPERATOR(==), OPERATOR(/=), OPERATOR(<), OPERATOR(<=), OPERATOR(>), OPERATOR(>=)
+
  PUBLIC :: xios(getVar)
  PUBLIC :: xios(setVar)
Index: XIOS/trunk/src/interface/fortran_attr/context_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/context_interface_attr.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran_attr/context_interface_attr.F90	(revision 545)
@@ -96,5 +96,5 @@
     SUBROUTINE cxios_set_context_timestep(context_hdl, timestep) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
       TYPE(txios(duration)), VALUE :: timestep
@@ -103,5 +103,5 @@
     SUBROUTINE cxios_get_context_timestep(context_hdl, timestep) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: context_hdl
       TYPE(txios(duration)) :: timestep
Index: XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90	(revision 545)
@@ -151,5 +151,5 @@
     SUBROUTINE cxios_set_field_freq_offset(field_hdl, freq_offset) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
       TYPE(txios(duration)), VALUE :: freq_offset
@@ -158,5 +158,5 @@
     SUBROUTINE cxios_get_field_freq_offset(field_hdl, freq_offset) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
       TYPE(txios(duration)) :: freq_offset
@@ -172,5 +172,5 @@
     SUBROUTINE cxios_set_field_freq_op(field_hdl, freq_op) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
       TYPE(txios(duration)), VALUE :: freq_op
@@ -179,5 +179,5 @@
     SUBROUTINE cxios_get_field_freq_op(field_hdl, freq_op) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl
       TYPE(txios(duration)) :: freq_op
Index: XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90	(revision 545)
@@ -151,5 +151,5 @@
     SUBROUTINE cxios_set_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
       TYPE(txios(duration)), VALUE :: freq_offset
@@ -158,5 +158,5 @@
     SUBROUTINE cxios_get_fieldgroup_freq_offset(fieldgroup_hdl, freq_offset) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
       TYPE(txios(duration)) :: freq_offset
@@ -172,5 +172,5 @@
     SUBROUTINE cxios_set_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
       TYPE(txios(duration)), VALUE :: freq_op
@@ -179,5 +179,5 @@
     SUBROUTINE cxios_get_fieldgroup_freq_op(fieldgroup_hdl, freq_op) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl
       TYPE(txios(duration)) :: freq_op
Index: XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran_attr/file_interface_attr.F90	(revision 545)
@@ -153,5 +153,5 @@
     SUBROUTINE cxios_set_file_output_freq(file_hdl, output_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)), VALUE :: output_freq
@@ -160,5 +160,5 @@
     SUBROUTINE cxios_get_file_output_freq(file_hdl, output_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)) :: output_freq
@@ -214,5 +214,5 @@
     SUBROUTINE cxios_set_file_split_freq(file_hdl, split_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)), VALUE :: split_freq
@@ -221,5 +221,5 @@
     SUBROUTINE cxios_get_file_split_freq(file_hdl, split_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)) :: split_freq
@@ -256,5 +256,5 @@
     SUBROUTINE cxios_set_file_sync_freq(file_hdl, sync_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)), VALUE :: sync_freq
@@ -263,5 +263,5 @@
     SUBROUTINE cxios_get_file_sync_freq(file_hdl, sync_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl
       TYPE(txios(duration)) :: sync_freq
Index: XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90
===================================================================
--- XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 541)
+++ XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.F90	(revision 545)
@@ -174,5 +174,5 @@
     SUBROUTINE cxios_set_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)), VALUE :: output_freq
@@ -181,5 +181,5 @@
     SUBROUTINE cxios_get_filegroup_output_freq(filegroup_hdl, output_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)) :: output_freq
@@ -235,5 +235,5 @@
     SUBROUTINE cxios_set_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)), VALUE :: split_freq
@@ -242,5 +242,5 @@
     SUBROUTINE cxios_get_filegroup_split_freq(filegroup_hdl, split_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)) :: split_freq
@@ -277,5 +277,5 @@
     SUBROUTINE cxios_set_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)), VALUE :: sync_freq
@@ -284,5 +284,5 @@
     SUBROUTINE cxios_get_filegroup_sync_freq(filegroup_hdl, sync_freq) BIND(C)
       USE ISO_C_BINDING
-      USE IDATE
+      USE IDURATION
       INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl
       TYPE(txios(duration)) :: sync_freq
