gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dcdatetimesetcaltype.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 Set the calendar type
11!> @details
12!> Procedures described in this file are provided from "dc_date" module.
13!> @enden
14!>
15!> @ja
16!> @brief 暦法の設定
17!> @details
18!> このファイルで提供される手続き群は dc_date モジュールにて提供されます。
19!> @endja
20!>
21
22!> @en
23!> @brief Set the default calendar type
24!> @details
25!> Set the default calendar type.
26!> Specify one of dc_date_types#CAL_CYCLIC, dc_date_types#CAL_NOLEAP,
27!> dc_date_types#CAL_JULIAN, or dc_date_types#CAL_GREGORIAN
28!> in the argument `caltype`.
29!>
30!> If this procedure is not called, the default calendar type is
31!> set to dc_date_types#CAL_GREGORIAN.
32!>
33!> @param[in] caltype Calendar type to set as default
34!> @enden
35!>
36!> @ja
37!> @brief 暦法のデフォルトを設定
38!> @details
39!> 暦法のデフォルトを設定します.
40!> dc_date_types#CAL_CYCLIC, dc_date_types#CAL_NOLEAP,
41!> dc_date_types#CAL_JULIAN, dc_date_types#CAL_GREGORIAN
42!> のいづれかを引数 `caltype` に与えてください.
43!>
44!> なお, この手続きを呼ばない場合, デフォルトの暦法は
45!> dc_date_types#CAL_GREGORIAN に設定されています.
46!>
47!> @param[in] caltype デフォルトに設定する暦法
48!> @endja
49subroutine dcdatetimesetcaltype(caltype)
50
51 use dc_date_types, only: caltype_default => caltype
52 use dc_trace, only: beginsub, endsub
53 use dc_message, only: messagenotify
55 implicit none
56 integer, intent(in):: caltype
57 character(*), parameter :: subname = 'DCDateTimeSetCaltype'
58continue
59 call beginsub(subname, 'caltype=<%d>', i=(/caltype/))
60 if (validcaltype(caltype)) then
61 caltype_default = caltype
62 else
63 call messagenotify('W', subname, &
64 & 'caltype=<%d> is invalid calender type.', &
65 & i=(/caltype/))
66 end if
67 call endsub(subname, 'dc_date_types#caltype_default=<%d>', i=(/caltype_default/))
68end subroutine dcdatetimesetcaltype
subroutine dcdatetimesetcaltype(caltype)
Set the calendar type.
Interface declarations for procedures provided from dc_date.
Derived types and parameters for date and time.
integer, save, public caltype
Default calendar type (Gregorian)
Message output module.
Debug tracing module.
Definition dc_trace.f90:150
subroutine, public beginsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca, version)
Definition dc_trace.f90:476
subroutine, public endsub(name, fmt, i, r, d, l, n, c1, c2, c3, ca)
Definition dc_trace.f90:599