anchor.diff:  
   
   
  +PURE ELEMENTAL CHARACTER(LEN=5) FUNCTION tzOffset(self)
  +!======================================================================>
  +!
  +! Returns a character string with timezone offset in hours from UTC,
  +! in format +/-[hh][mm].
  +!
  +!======================================================================>
  +
  +  ! ARGUMENTS:
  +  CLASS(datetime),INTENT(IN) :: self
  +
  +  INTEGER :: hours,minutes
  +
  +  IF(self%tz < 0)THEN
  +    tzOffset(1:1) = '-'
  +  ELSE
  +    tzOffset(1:1) = '+'
  +  ENDIF
  +
  +  hours   = INT(ABS(self%tz))
  +  minutes = NINT((ABS(self%tz)-hours)*60)
  +
  +  IF(minutes == 60)THEN
  +    minutes = 0
  +    hours = hours+1
  +  ENDIF
  +
  +  WRITE(UNIT=tzOffset(2:5),FMT='(2I2.2)')hours,minutes
  +
  +ENDFUNCTION tzOffset
  +!======================================================================>
  +
  +
  +
  +PURE ELEMENTAL TYPE(datetime) FUNCTION utc(self)
  +!======================================================================>
  +!
  +! Returns the datetime instance at Centralized Universal Time (UTC). 
  +!
  +!======================================================================>
  +
  +  ! ARGUMENTS:
  +  CLASS(datetime),INTENT(IN) :: self
  +
  +  INTEGER :: hours,minutes,sgn
  +
  +  hours   = INT(ABS(self%tz))
  +  minutes = NINT((ABS(self%tz)-hours)*60)
  +  sgn     = INT(self%tz/ABS(self%tz))
  +
  +  utc = self-timedelta(hours=sgn*hours,minutes=sgn*minutes)
  +  utc%tz = 0
  +
  +ENDFUNCTION utc
  +!======================================================================>
  +
  +
  +
   PURE ELEMENTAL INTEGER FUNCTION yearday(self)
   !======================================================================>
   !
  
positive.code:   ! ARGUMENTS:
    CLASS(datetime),INTENT(IN) :: self
  
    INTEGER,DIMENSION(8)       :: values
  
    CALL date_and_time(values=values)
    now = datetime(year        = values(1),&
  
negative.code:   INTEGER :: second      = 0 ! Second in minute       [0-59]
    INTEGER :: millisecond = 0 ! Milliseconds in second [0-999]
  
    REAL :: tz = 0 ! Timezone offset from UTC [hours]
  
    CONTAINS
  
  