gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dcdatetimele.f90
Go to the documentation of this file.
1! -*- mode: f90; coding: utf-8 -*-
2!-----------------------------------------------------------------------
3! Copyright (c) 2000-2026 Gtool Development Group. All rights reserved.
4!-----------------------------------------------------------------------
5!>
6!> @author Yasuhiro MORIKAWA
7!> @copyright Copyright (C) GFD Dennou Club, 2000-2026. All rights reserved. <br/>
8!> License is BSD-2-Clause. see [COPYRIGHT](@ref COPYRIGHT) in detail
9!> @en
10!> @brief Functions for user defined operation (<=)
11!> @details
12!> This file contains implementation procedures of less-than-or-equal
13!> comparison for dc_date_types#DC_DATETIME and dc_date_types#DC_DIFFTIME.
14!> @enden
15!>
16!> @ja
17!> @brief 利用者定義演算子 (<=) のための関数
18!> @details
19!> このファイルには dc_date_types#DC_DATETIME および dc_date_types#DC_DIFFTIME
20!> の小なりイコール比較の実装手続きが含まれています。
21!> @endja
22!>
23
24!> @en
25!> @brief Compare two DC_DATETIME variables (<=)
26!> @details
27!> Compare two datetime values.
28!> Returns .true. if the datetime stored in the second argument is
29!> later than or equal to the datetime stored in the first argument.
30!>
31!> @param[in] time1 First datetime to compare
32!> @param[in] time2 Second datetime to compare
33!> @return .true. if time1 <= time2, .false. otherwise
34!> @enden
35!>
36!> @ja
37!> @brief 2つの DC_DATETIME 変数の比較 (<=)
38!> @details
39!> 2 つの引数の日時を比較します.
40!> 2 つ目の引数に格納される日時が 1 つ目の引数に格納される日時
41!> よりも進んでいる場合かもしくは等しい場合, .true. が返ります.
42!>
43!> @param[in] time1 比較する1番目の日時
44!> @param[in] time2 比較する2番目の日時
45!> @return time1 <= time2 の場合 .true., それ以外は .false.
46!> @endja
47logical function dcdatetime_le_tt(time1, time2) result(result)
48
49 use dc_date_generic, only: operator(>)
51 implicit none
52 type(dc_datetime), intent(in):: time1, time2
53continue
54 result = .not. time1 > time2
55end function dcdatetime_le_tt
56
57!> @en
58!> @brief Compare two DC_DIFFTIME variables (<=)
59!> @details
60!> Compare two time difference values.
61!> Returns .true. if the time difference stored in the second argument is
62!> greater than or equal to the time difference stored in the first argument.
63!>
64!> @param[in] diff1 First time difference to compare
65!> @param[in] diff2 Second time difference to compare
66!> @return .true. if diff1 <= diff2, .false. otherwise
67!> @enden
68!>
69!> @ja
70!> @brief 2つの DC_DIFFTIME 変数の比較 (<=)
71!> @details
72!> 2 つの引数の日時差を比較します.
73!> 2 つ目の引数に格納される日時差が 1 つ目の引数に格納される日時差
74!> よりも大きい場合かもしくは等しい場合, .true. が返ります.
75!>
76!> @param[in] diff1 比較する1番目の日時差
77!> @param[in] diff2 比較する2番目の日時差
78!> @return diff1 <= diff2 の場合 .true., それ以外は .false.
79!> @endja
80logical function dcdatetime_le_ff(diff1, diff2) result(result)
81
82 use dc_date_generic, only: operator(>)
84 implicit none
85 type(dc_difftime), intent(in):: diff1, diff2
86continue
87 result = .not. diff1 > diff2
88end function dcdatetime_le_ff
89
90!> @en
91!> @brief Compare DC_DIFFTIME with integer (<=)
92!> @details
93!> Compare a time difference value with an integer.
94!> Returns .true. if the time difference stored in the first argument is
95!> less than or equal to the integer stored in the second argument.
96!>
97!> @param[in] diff Time difference to compare
98!> @param[in] factor Integer value to compare
99!> @return .true. if diff <= factor, .false. otherwise
100!> @enden
101!>
102!> @ja
103!> @brief DC_DIFFTIME と整数の比較 (<=)
104!> @details
105!> 2 つの引数の日時差を比較します.
106!> 2 つ目の引数に格納される日時差が 1 つ目の引数に格納される日時差
107!> よりも大きい場合かもしくは等しい場合, .true. が返ります.
108!>
109!> @param[in] diff 比較する日時差
110!> @param[in] factor 比較する整数値
111!> @return diff <= factor の場合 .true., それ以外は .false.
112!> @endja
113logical function dcdatetime_le_fi(diff, factor) result(result)
114
115 use dc_date_generic, only: operator(>)
117 implicit none
118 type(dc_difftime), intent(in):: diff
119 integer, intent(in):: factor
120continue
121 result = .not. diff > factor
122end function dcdatetime_le_fi
123
124!> @en
125!> @brief Compare integer with DC_DIFFTIME (<=)
126!> @details
127!> Compare an integer with a time difference value.
128!> Returns .true. if the integer stored in the first argument is
129!> less than or equal to the time difference stored in the second argument.
130!>
131!> @param[in] factor Integer value to compare
132!> @param[in] diff Time difference to compare
133!> @return .true. if factor <= diff, .false. otherwise
134!> @enden
135!>
136!> @ja
137!> @brief 整数と DC_DIFFTIME の比較 (<=)
138!> @details
139!> 2 つの引数の日時差を比較します.
140!> 2 つ目の引数に格納される日時差が 1 つ目の引数に格納される日時差
141!> よりも大きい場合かもしくは等しい場合, .true. が返ります.
142!>
143!> @param[in] factor 比較する整数値
144!> @param[in] diff 比較する日時差
145!> @return factor <= diff の場合 .true., それ以外は .false.
146!> @endja
147logical function dcdatetime_le_if(factor, diff) result(result)
148
149 use dc_date_generic, only: operator(>)
151 implicit none
152 integer, intent(in):: factor
153 type(dc_difftime), intent(in):: diff
154continue
155 result = .not. factor > diff
156end function dcdatetime_le_if
logical function dcdatetime_le_if(factor, diff)
logical function dcdatetime_le_tt(time1, time2)
Functions for user defined operation (<=).
logical function dcdatetime_le_ff(diff1, diff2)
logical function dcdatetime_le_fi(diff, factor)
Interface declarations for procedures provided from dc_date.
Derived types and parameters for date and time.