!= åˆ©ç”¨è€…å®šç¾©æ¼”ç®—å (<=) ã®ãŸã‚ã®é–¢æ•°
!= Functions for user defined operation (<=)
!
! Authors::   Yasuhiro MORIKAWA
! Version::   $Id: dcdatetimele.f90,v 1.1 2009-05-25 10:01:34 morikawa Exp $
! Tag Name::  $Name:  $
! Copyright:: Copyright (C) GFD Dennou Club, 2000-2005. All rights reserved.
! License::   See COPYRIGHT[link:../../COPYRIGHT]
!
  logical function dcdatetime_le_tt(time1, time2) result(result)
    !
    ! 2 ã¤ã®å¼•æ•°ã®æ—¥æ™‚ã‚’æ¯”è¼ƒã—ã¾ã™.
    ! 2 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚ãŒ 1 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚
    ! ã‚ˆã‚Šã‚‚é€²ã‚“ã§ã„ã‚‹å ´åˆã‹ã‚‚ã—ãã¯ç‰ã—ã„å ´åˆ, .true. ãŒè¿”ã‚Šã¾ã™.
    !
    use dc_date_generic, only: operator(>)
    use dc_date_types, only: DC_DATETIME, DC_DIFFTIME
    implicit none
    type(DC_DATETIME), intent(in):: time1, time2
  continue
    result = .not. time1 > time2
  end function dcdatetime_le_tt

  logical function dcdatetime_le_ff(diff1, diff2) result(result)
    !
    ! 2 ã¤ã®å¼•æ•°ã®æ—¥æ™‚å·®ã‚’æ¯”è¼ƒã—ã¾ã™.
    ! 2 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®ãŒ 1 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®
    ! ã‚ˆã‚Šã‚‚å¤§ãã„å ´åˆã‹ã‚‚ã—ãã¯ç‰ã—ã„å ´åˆ, .true. ãŒè¿”ã‚Šã¾ã™.
    !
    use dc_date_generic, only: operator(>)
    use dc_date_types, only: DC_DATETIME, DC_DIFFTIME
    implicit none
    type(DC_DIFFTIME), intent(in):: diff1, diff2
  continue
    result = .not. diff1 > diff2
  end function dcdatetime_le_ff

  logical function dcdatetime_le_fi(diff, factor) result(result)
    !
    ! 2 ã¤ã®å¼•æ•°ã®æ—¥æ™‚å·®ã‚’æ¯”è¼ƒã—ã¾ã™.
    ! 2 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®ãŒ 1 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®
    ! ã‚ˆã‚Šã‚‚å¤§ãã„å ´åˆã‹ã‚‚ã—ãã¯ç‰ã—ã„å ´åˆ, .true. ãŒè¿”ã‚Šã¾ã™.
    !
    use dc_date_generic, only: operator(>)
    use dc_date_types, only: DC_DATETIME, DC_DIFFTIME
    implicit none
    type(DC_DIFFTIME), intent(in):: diff
    integer, intent(in):: factor
  continue
    result = .not. diff > factor
  end function dcdatetime_le_fi

  logical function dcdatetime_le_if(factor, diff) result(result)
    !
    ! 2 ã¤ã®å¼•æ•°ã®æ—¥æ™‚å·®ã‚’æ¯”è¼ƒã—ã¾ã™.
    ! 2 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®ãŒ 1 ã¤ç›®ã®å¼•æ•°ã«æ ¼ç´ã•ã‚Œã‚‹æ—¥æ™‚å·®
    ! ã‚ˆã‚Šã‚‚å¤§ãã„å ´åˆã‹ã‚‚ã—ãã¯ç‰ã—ã„å ´åˆ, .true. ãŒè¿”ã‚Šã¾ã™.
    !
    use dc_date_generic, only: operator(>)
    use dc_date_types, only: DC_DATETIME, DC_DIFFTIME
    implicit none
    integer, intent(in):: factor
    type(DC_DIFFTIME), intent(in):: diff
  continue
    result = .not. factor > diff
  end function dcdatetime_le_if