decentworks-date-support 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/.gem_rbs_collection/actionpack/7.2/.rbs_meta.yaml +9 -0
  3. data/.gem_rbs_collection/actionpack/7.2/actioncontroller-7.2.rbs +14 -0
  4. data/.gem_rbs_collection/actionpack/7.2/actioncontroller.rbs +290 -0
  5. data/.gem_rbs_collection/actionpack/7.2/actiondispatch.rbs +349 -0
  6. data/.gem_rbs_collection/actionpack/7.2/actionpack-generated.rbs +11497 -0
  7. data/.gem_rbs_collection/actionpack/7.2/patch.rbs +77 -0
  8. data/.gem_rbs_collection/actionview/6.0/.rbs_meta.yaml +9 -0
  9. data/.gem_rbs_collection/actionview/6.0/actionview-generated.rbs +8976 -0
  10. data/.gem_rbs_collection/actionview/6.0/actionview.rbs +1940 -0
  11. data/.gem_rbs_collection/actionview/6.0/patch.rbs +57 -0
  12. data/.gem_rbs_collection/activesupport/7.0/.rbs_meta.yaml +9 -0
  13. data/.gem_rbs_collection/activesupport/7.0/activesupport-7.0.rbs +381 -0
  14. data/.gem_rbs_collection/activesupport/7.0/activesupport-generated.rbs +11633 -0
  15. data/.gem_rbs_collection/activesupport/7.0/activesupport.rbs +724 -0
  16. data/.gem_rbs_collection/activesupport/7.0/manifest.yaml +15 -0
  17. data/.gem_rbs_collection/activesupport/7.0/patch.rbs +55 -0
  18. data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
  19. data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
  20. data/.gem_rbs_collection/cgi/0.5/.rbs_meta.yaml +9 -0
  21. data/.gem_rbs_collection/cgi/0.5/core.rbs +925 -0
  22. data/.gem_rbs_collection/cgi/0.5/manifest.yaml +3 -0
  23. data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
  24. data/.gem_rbs_collection/concurrent-ruby/1.1/array.rbs +4 -0
  25. data/.gem_rbs_collection/concurrent-ruby/1.1/atomic_reference.rbs +16 -0
  26. data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +96 -0
  27. data/.gem_rbs_collection/concurrent-ruby/1.1/hash.rbs +4 -0
  28. data/.gem_rbs_collection/concurrent-ruby/1.1/map.rbs +68 -0
  29. data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
  30. data/.gem_rbs_collection/concurrent-ruby/1.1/set.rbs +4 -0
  31. data/.gem_rbs_collection/concurrent-ruby/1.1/timer_task.rbs +47 -0
  32. data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
  33. data/.gem_rbs_collection/connection_pool/2.4/.rbs_meta.yaml +9 -0
  34. data/.gem_rbs_collection/connection_pool/2.4/connection_pool.rbs +34 -0
  35. data/.gem_rbs_collection/connection_pool/2.4/manifest.yaml +2 -0
  36. data/.gem_rbs_collection/diff-lcs/1.5/.rbs_meta.yaml +9 -0
  37. data/.gem_rbs_collection/diff-lcs/1.5/diff-lcs.rbs +11 -0
  38. data/.gem_rbs_collection/faker/3.4.2/.rbs_meta.yaml +9 -0
  39. data/.gem_rbs_collection/faker/3.4.2/faker-2.23.rbs +90 -0
  40. data/.gem_rbs_collection/faker/3.4.2/faker.rbs +18 -0
  41. data/.gem_rbs_collection/i18n/1.10/.rbs_meta.yaml +9 -0
  42. data/.gem_rbs_collection/i18n/1.10/backend.rbs +274 -0
  43. data/.gem_rbs_collection/i18n/1.10/i18n.rbs +116 -0
  44. data/.gem_rbs_collection/lint_roller/1.1/.rbs_meta.yaml +9 -0
  45. data/.gem_rbs_collection/lint_roller/1.1/lint_roller.rbs +48 -0
  46. data/.gem_rbs_collection/minitest/5.25/.rbs_meta.yaml +9 -0
  47. data/.gem_rbs_collection/minitest/5.25/minitest/abstract_reporter.rbs +52 -0
  48. data/.gem_rbs_collection/minitest/5.25/minitest/assertion.rbs +17 -0
  49. data/.gem_rbs_collection/minitest/5.25/minitest/assertions.rbs +590 -0
  50. data/.gem_rbs_collection/minitest/5.25/minitest/backtrace_filter.rbs +23 -0
  51. data/.gem_rbs_collection/minitest/5.25/minitest/bench_spec.rbs +102 -0
  52. data/.gem_rbs_collection/minitest/5.25/minitest/benchmark.rbs +259 -0
  53. data/.gem_rbs_collection/minitest/5.25/minitest/composite_reporter.rbs +25 -0
  54. data/.gem_rbs_collection/minitest/5.25/minitest/compress.rbs +13 -0
  55. data/.gem_rbs_collection/minitest/5.25/minitest/error_on_warning.rbs +3 -0
  56. data/.gem_rbs_collection/minitest/5.25/minitest/expectation.rbs +2 -0
  57. data/.gem_rbs_collection/minitest/5.25/minitest/expectations.rbs +21 -0
  58. data/.gem_rbs_collection/minitest/5.25/minitest/guard.rbs +64 -0
  59. data/.gem_rbs_collection/minitest/5.25/minitest/mock.rbs +64 -0
  60. data/.gem_rbs_collection/minitest/5.25/minitest/parallel/executor.rbs +46 -0
  61. data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test/class_methods.rbs +5 -0
  62. data/.gem_rbs_collection/minitest/5.25/minitest/parallel/test.rbs +3 -0
  63. data/.gem_rbs_collection/minitest/5.25/minitest/parallel.rbs +2 -0
  64. data/.gem_rbs_collection/minitest/5.25/minitest/pride_io.rbs +62 -0
  65. data/.gem_rbs_collection/minitest/5.25/minitest/pride_lol.rbs +19 -0
  66. data/.gem_rbs_collection/minitest/5.25/minitest/progress_reporter.rbs +11 -0
  67. data/.gem_rbs_collection/minitest/5.25/minitest/reportable.rbs +53 -0
  68. data/.gem_rbs_collection/minitest/5.25/minitest/reporter.rbs +5 -0
  69. data/.gem_rbs_collection/minitest/5.25/minitest/result.rbs +28 -0
  70. data/.gem_rbs_collection/minitest/5.25/minitest/runnable.rbs +163 -0
  71. data/.gem_rbs_collection/minitest/5.25/minitest/skip.rbs +6 -0
  72. data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl/instance_methods.rbs +48 -0
  73. data/.gem_rbs_collection/minitest/5.25/minitest/spec/dsl.rbs +129 -0
  74. data/.gem_rbs_collection/minitest/5.25/minitest/spec.rbs +11 -0
  75. data/.gem_rbs_collection/minitest/5.25/minitest/statistics_reporter.rbs +81 -0
  76. data/.gem_rbs_collection/minitest/5.25/minitest/summary_reporter.rbs +18 -0
  77. data/.gem_rbs_collection/minitest/5.25/minitest/test/lifecycle_hooks.rbs +92 -0
  78. data/.gem_rbs_collection/minitest/5.25/minitest/test.rbs +69 -0
  79. data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_error.rbs +12 -0
  80. data/.gem_rbs_collection/minitest/5.25/minitest/unexpected_warning.rbs +6 -0
  81. data/.gem_rbs_collection/minitest/5.25/minitest/unit/test_case.rbs +3 -0
  82. data/.gem_rbs_collection/minitest/5.25/minitest/unit.rbs +4 -0
  83. data/.gem_rbs_collection/minitest/5.25/minitest.rbs +115 -0
  84. data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +9 -0
  85. data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +2332 -0
  86. data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +4 -0
  87. data/.gem_rbs_collection/parallel/1.20/.rbs_meta.yaml +9 -0
  88. data/.gem_rbs_collection/parallel/1.20/parallel.rbs +86 -0
  89. data/.gem_rbs_collection/parser/3.2/.rbs_meta.yaml +9 -0
  90. data/.gem_rbs_collection/parser/3.2/manifest.yaml +7 -0
  91. data/.gem_rbs_collection/parser/3.2/parser.rbs +194 -0
  92. data/.gem_rbs_collection/parser/3.2/polyfill.rbs +4 -0
  93. data/.gem_rbs_collection/rack/2.2/.rbs_meta.yaml +9 -0
  94. data/.gem_rbs_collection/rack/2.2/manifest.yaml +3 -0
  95. data/.gem_rbs_collection/rack/2.2/rack.rbs +1480 -0
  96. data/.gem_rbs_collection/rails-dom-testing/2.0/.rbs_meta.yaml +9 -0
  97. data/.gem_rbs_collection/rails-dom-testing/2.0/rails-dom-testing.rbs +51 -0
  98. data/.gem_rbs_collection/rails-html-sanitizer/1.6/.rbs_meta.yaml +9 -0
  99. data/.gem_rbs_collection/rails-html-sanitizer/1.6/rails-html-sanitizer.rbs +53 -0
  100. data/.gem_rbs_collection/railties/6.0/.rbs_meta.yaml +9 -0
  101. data/.gem_rbs_collection/railties/6.0/manifest.yaml +2 -0
  102. data/.gem_rbs_collection/railties/6.0/patch.rbs +17 -0
  103. data/.gem_rbs_collection/railties/6.0/railties-generated.rbs +4822 -0
  104. data/.gem_rbs_collection/railties/6.0/railties.rbs +44 -0
  105. data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
  106. data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
  107. data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
  108. data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
  109. data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
  110. data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
  111. data/.gem_rbs_collection/rake/13.0/rake.rbs +39 -0
  112. data/.gem_rbs_collection/regexp_parser/2.8/.rbs_meta.yaml +9 -0
  113. data/.gem_rbs_collection/regexp_parser/2.8/regexp_parser.rbs +17 -0
  114. data/.gem_rbs_collection/rubocop/1.57/.rbs_meta.yaml +9 -0
  115. data/.gem_rbs_collection/rubocop/1.57/rubocop.rbs +208 -0
  116. data/.gem_rbs_collection/rubocop-ast/1.46/.rbs_meta.yaml +9 -0
  117. data/.gem_rbs_collection/rubocop-ast/1.46/rubocop-ast.rbs +903 -0
  118. data/.gem_rbs_collection/thor/1.2/.rbs_meta.yaml +9 -0
  119. data/.gem_rbs_collection/thor/1.2/thor.rbs +62 -0
  120. data/.gem_rbs_collection/tzinfo/2.0/.rbs_meta.yaml +9 -0
  121. data/.gem_rbs_collection/tzinfo/2.0/manifest.yaml +7 -0
  122. data/.gem_rbs_collection/tzinfo/2.0/tzinfo.rbs +600 -0
  123. data/.rspec +3 -0
  124. data/.rubocop.yml +8 -0
  125. data/.ruby-version +1 -0
  126. data/CHANGELOG.md +5 -0
  127. data/CODE_OF_CONDUCT.md +132 -0
  128. data/LICENSE +21 -0
  129. data/LICENSE.txt +21 -0
  130. data/README.md +54 -0
  131. data/Rakefile +12 -0
  132. data/Steepfile +43 -0
  133. data/lib/decentworks/active_support/time_with_zone_support.rb +327 -0
  134. data/lib/decentworks/date/support/version.rb +9 -0
  135. data/lib/decentworks/date_support.rb +323 -0
  136. data/lib/decentworks_date_support.rb +4 -0
  137. data/rbs_collection.lock.yaml +288 -0
  138. data/rbs_collection.yaml +41 -0
  139. data/sig/decentworks/active_support/time_with_zone_support.rbs +109 -0
  140. data/sig/decentworks/date/support.rbs +8 -0
  141. data/sig/decentworks/date_support.rbs +107 -0
  142. metadata +197 -0
@@ -0,0 +1,323 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "date"
4
+
5
+ module Decentworks
6
+ module DateSupport
7
+ refine ::Date do
8
+ # ###############################################################################################################
9
+ # 週関係
10
+ # ###############################################################################################################
11
+
12
+ #
13
+ # 今週
14
+ #
15
+
16
+ # 現在の日付が属する週の始まりの日付
17
+ #
18
+ # @param beginning_of_week 週の始まりの曜日。省略した場合は、config.beginning_of_weekの設定に従います。
19
+ def beginning_of_this_week(beginning_of_week = nil)
20
+ beginning_of_week(beginning_of_week.presence || ::Date.beginning_of_week) # steep:ignore NoMethod
21
+ end
22
+
23
+ # 現在の日付が属する週の終わりの日付
24
+ #
25
+ # @param beginning_of_week 週の始まりの曜日。省略した場合は、config.beginning_of_weekの設定に従います。
26
+ def end_of_this_week(beginning_of_week = nil)
27
+ next_week # steep:ignore NoMethod
28
+ .beginning_of_this_week(beginning_of_week)
29
+ .yesterday
30
+ end
31
+
32
+ # 今週の期間
33
+ #
34
+ # @param beginning_of_week 週の始まりの曜日。省略した場合は、config.beginning_of_weekの設定に従います。
35
+ def all_this_week(beginning_of_week = nil)
36
+ ::Range.new(
37
+ beginning_of_this_week(beginning_of_week),
38
+ end_of_this_week(beginning_of_week)
39
+ )
40
+ end
41
+
42
+ # ###############################################################################################################
43
+ # 月関係
44
+ # ###############################################################################################################
45
+
46
+ #
47
+ # 今月関係
48
+ #
49
+
50
+ # 現在の日付が属する月の期間
51
+ def all_this_month
52
+ ::Range.new(
53
+ beginning_of_month.to_date, # steep:ignore NoMethod
54
+ end_of_month.to_date # steep:ignore NoMethod
55
+ )
56
+ end
57
+
58
+ #
59
+ # Nヶ月前関係
60
+ #
61
+
62
+ # 2ヶ月前の日付
63
+ def two_months_ago = months_ago(2) # steep:ignore NoMethod
64
+
65
+ # 3ヶ月前の日付
66
+ def three_months_ago = months_ago(3) # steep:ignore NoMethod
67
+
68
+ # 4ヶ月前の日付
69
+ def four_months_ago = months_ago(4) # steep:ignore NoMethod
70
+
71
+ # 5ヶ月前の日付
72
+ def five_months_ago = months_ago(5) # steep:ignore NoMethod
73
+
74
+ # 6ヶ月前の日付
75
+ def six_months_ago = months_ago(6) # steep:ignore NoMethod
76
+
77
+ # 半年前の日
78
+ alias_method :half_year_ago, :six_months_ago
79
+
80
+ # 7ヶ月前の日付
81
+ def seven_months_ago = months_ago(7) # steep:ignore NoMethod
82
+
83
+ # 8ヶ月前の日付
84
+ def eight_months_ago = months_ago(8) # steep:ignore NoMethod
85
+
86
+ # 9ヶ月前の日付
87
+ def nine_months_ago = months_ago(9) # steep:ignore NoMethod
88
+
89
+ # 10ヶ月前の日付
90
+ def ten_months_ago = months_ago(10) # steep:ignore NoMethod
91
+
92
+ # 11ヶ月前の日付
93
+ def eleven_months_ago = months_ago(11) # steep:ignore NoMethod
94
+
95
+ #
96
+ # Nヶ月後関係
97
+ #
98
+
99
+ # 2ヶ月後の日付
100
+ def two_months_since = months_since(2) # steep:ignore NoMethod
101
+
102
+ # 3ヶ月後の日付
103
+ def three_months_since = months_since(3) # steep:ignore NoMethod
104
+
105
+ # 4ヶ月後の日付
106
+ def four_months_since = months_since(4) # steep:ignore NoMethod
107
+
108
+ # 5ヶ月後の日付
109
+ def five_months_since = months_since(5) # steep:ignore NoMethod
110
+
111
+ # 6ヶ月後の日付
112
+ def six_months_since = months_since(6) # steep:ignore NoMethod
113
+
114
+ # 半年前の日
115
+ alias_method :half_year_since, :six_months_since
116
+
117
+ # 7ヶ月後の日付
118
+ def seven_months_since = months_since(7) # steep:ignore NoMethod
119
+
120
+ # 8ヶ月後の日付
121
+ def eight_months_since = months_since(8) # steep:ignore NoMethod
122
+
123
+ # 9ヶ月後の日付
124
+ def nine_months_since = months_since(9) # steep:ignore NoMethod
125
+
126
+ # 10ヶ月後の日付
127
+ def ten_months_since = months_since(10) # steep:ignore NoMethod
128
+
129
+ # 11ヶ月後の日付
130
+ def eleven_months_since = months_since(11) # steep:ignore NoMethod
131
+
132
+ #
133
+ # 暦月関係
134
+ #
135
+
136
+ # 1月の月初
137
+ def beginning_of_january = change(month: 1, day: 1) # steep:ignore NoMethod
138
+
139
+ # 1月の月末
140
+ def end_of_january = beginning_of_january.end_of_month
141
+
142
+ # 1月の期間
143
+ def all_january = ::Range.new(beginning_of_january, end_of_january)
144
+
145
+ # 2月の月初
146
+ def beginning_of_february = change(month: 2, day: 1) # steep:ignore NoMethod
147
+
148
+ # 2月の月末
149
+ def end_of_february = beginning_of_february.end_of_month
150
+
151
+ # 2月の期間
152
+ def all_february = ::Range.new(beginning_of_february, end_of_february)
153
+
154
+ # 3月の月初
155
+ def beginning_of_march = change(month: 3, day: 1) # steep:ignore NoMethod
156
+
157
+ # 3月の月末
158
+ def end_of_march = beginning_of_march.end_of_month
159
+
160
+ # 3月の期間
161
+ def all_march = ::Range.new(beginning_of_march, end_of_march)
162
+
163
+ # 4月の月初
164
+ def beginning_of_april = change(month: 4, day: 1) # steep:ignore NoMethod
165
+
166
+ # 4月の月末
167
+ def end_of_april = beginning_of_april.end_of_month
168
+
169
+ # 4月の期間
170
+ def all_april = ::Range.new(beginning_of_april, end_of_april)
171
+
172
+ # 5月の月初
173
+ def beginning_of_may = change(month: 5, day: 1) # steep:ignore NoMethod
174
+
175
+ # 5月の月末
176
+ def end_of_may = beginning_of_may.end_of_month
177
+
178
+ # 5月の期間
179
+ def all_may = ::Range.new(beginning_of_may, end_of_may)
180
+
181
+ # 6月の月初
182
+ def beginning_of_june = change(month: 6, day: 1) # steep:ignore NoMethod
183
+
184
+ # 6月の月末
185
+ def end_of_june = beginning_of_june.end_of_month
186
+
187
+ # 6月の期間
188
+ def all_june = ::Range.new(beginning_of_june, end_of_june)
189
+
190
+ # 7月の月初
191
+ def beginning_of_july = change(month: 7, day: 1) # steep:ignore NoMethod
192
+
193
+ # 7月の月末
194
+ def end_of_july = beginning_of_july.end_of_month
195
+
196
+ # 7月の期間
197
+ def all_july = ::Range.new(beginning_of_july, end_of_july)
198
+
199
+ # 8月の月初
200
+ def beginning_of_august = change(month: 8, day: 1) # steep:ignore NoMethod
201
+
202
+ # 8月の月末
203
+ def end_of_august = beginning_of_august.end_of_month
204
+
205
+ # 8月の期間
206
+ def all_august = ::Range.new(beginning_of_august, end_of_august)
207
+
208
+ # 9月の月初
209
+ def beginning_of_september = change(month: 9, day: 1) # steep:ignore NoMethod
210
+
211
+ # 9月の月末
212
+ def end_of_september = beginning_of_september.end_of_month
213
+
214
+ # 9月の期間
215
+ def all_september = ::Range.new(beginning_of_september, end_of_september)
216
+
217
+ # 10月の月初
218
+ def beginning_of_october = change(month: 10, day: 1) # steep:ignore NoMethod
219
+
220
+ # 10月の月末
221
+ def end_of_october = beginning_of_october.end_of_month
222
+
223
+ # 10月の期間
224
+ def all_october = ::Range.new(beginning_of_october, end_of_october)
225
+
226
+ # 11月の月初
227
+ def beginning_of_november = change(month: 11, day: 1) # steep:ignore NoMethod
228
+
229
+ # 11月の月末
230
+ def end_of_november = beginning_of_november.end_of_month
231
+
232
+ # 11月の期間
233
+ def all_november = ::Range.new(beginning_of_november, end_of_november)
234
+
235
+ # 12月の月初
236
+ def beginning_of_december = change(month: 12, day: 1) # steep:ignore NoMethod
237
+
238
+ # 12月の月末
239
+ def end_of_december = beginning_of_december.end_of_month
240
+
241
+ # 12月の期間
242
+ def all_december = ::Range.new(beginning_of_december, end_of_december)
243
+
244
+ # ###############################################################################################################
245
+ # 四半期関係
246
+ # ###############################################################################################################
247
+
248
+ # 第1四半期の始めの日付
249
+ alias_method :beginning_of_first_quarter, :beginning_of_january
250
+
251
+ # 第1四半期の終わりの日付
252
+ alias_method :end_of_first_quarter, :end_of_march
253
+
254
+ # 第1四半期の期間
255
+ def all_first_quarter = ::Range.new(beginning_of_first_quarter, end_of_first_quarter)
256
+
257
+ # 第2四半期の始めの日付
258
+ alias_method :beginning_of_second_quarter, :beginning_of_april
259
+
260
+ # 第2四半期の終わりの日付
261
+ alias_method :end_of_second_quarter, :end_of_june
262
+
263
+ # 第2四半期の期間
264
+ def all_second_quarter = ::Range.new(beginning_of_second_quarter, end_of_second_quarter)
265
+
266
+ # 第3四半期の始めの日付
267
+ alias_method :beginning_of_third_quarter, :beginning_of_july
268
+
269
+ # 第3四半期の終わりの日付
270
+ alias_method :end_of_third_quarter, :end_of_september
271
+
272
+ # 第3四半期の期間
273
+ def all_third_quarter = ::Range.new(beginning_of_third_quarter, end_of_third_quarter)
274
+
275
+ # 第4四半期の始めの日付
276
+ alias_method :beginning_of_fourth_quarter, :beginning_of_october
277
+
278
+ # 第4四半期の終わりの日付
279
+ alias_method :end_of_fourth_quarter, :end_of_december
280
+
281
+ # 第4四半期の期間
282
+ def all_fourth_quarter = ::Range.new(beginning_of_fourth_quarter, end_of_fourth_quarter)
283
+
284
+ # ###############################################################################################################
285
+ # 上下期関係
286
+ # ###############################################################################################################
287
+
288
+ # 上期の始まりの日付
289
+ alias_method :beginning_of_first_half, :beginning_of_first_quarter
290
+
291
+ # 上期の終わりの日付
292
+ alias_method :end_of_first_half, :end_of_second_quarter
293
+
294
+ # 上期の期間
295
+ def all_first_half = ::Range.new(beginning_of_first_half, end_of_first_half)
296
+
297
+ # 下期の始まりの日付
298
+ alias_method :beginning_of_second_half, :beginning_of_third_quarter
299
+
300
+ # 下期の終わりの日付
301
+ alias_method :end_of_second_half, :end_of_fourth_quarter
302
+
303
+ # 下期の期間
304
+ def all_second_half = ::Range.new(beginning_of_second_half, end_of_second_half)
305
+ end
306
+
307
+ refine ::Date.singleton_class do
308
+ # ###############################################################################################################
309
+ # 満経過月数
310
+ # ###############################################################################################################
311
+
312
+ # 満経過月数
313
+ # steep:ignore:start
314
+ def whole_months_elapsed(from:, to:)
315
+ diff_year = to.year - from.year
316
+ diff_month = to.month - from.month
317
+
318
+ (diff_year * 12) + diff_month - (to.day >= from.day ? 0 : 1)
319
+ end
320
+ # steep:ignore:end
321
+ end
322
+ end
323
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "decentworks/date_support"
4
+ require "decentworks/active_support/time_with_zone_support"
@@ -0,0 +1,288 @@
1
+ ---
2
+ path: ".gem_rbs_collection"
3
+ gems:
4
+ - name: actionpack
5
+ version: '7.2'
6
+ source:
7
+ type: git
8
+ name: ruby/gem_rbs_collection
9
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
10
+ remote: https://github.com/ruby/gem_rbs_collection.git
11
+ repo_dir: gems
12
+ - name: actionview
13
+ version: '6.0'
14
+ source:
15
+ type: git
16
+ name: ruby/gem_rbs_collection
17
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
18
+ remote: https://github.com/ruby/gem_rbs_collection.git
19
+ repo_dir: gems
20
+ - name: activesupport
21
+ version: '7.0'
22
+ source:
23
+ type: git
24
+ name: ruby/gem_rbs_collection
25
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
26
+ remote: https://github.com/ruby/gem_rbs_collection.git
27
+ repo_dir: gems
28
+ - name: ast
29
+ version: '2.4'
30
+ source:
31
+ type: git
32
+ name: ruby/gem_rbs_collection
33
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
34
+ remote: https://github.com/ruby/gem_rbs_collection.git
35
+ repo_dir: gems
36
+ - name: base64
37
+ version: 0.3.0
38
+ source:
39
+ type: rubygems
40
+ - name: bigdecimal
41
+ version: 4.1.2
42
+ source:
43
+ type: rubygems
44
+ - name: cgi
45
+ version: '0.5'
46
+ source:
47
+ type: git
48
+ name: ruby/gem_rbs_collection
49
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
50
+ remote: https://github.com/ruby/gem_rbs_collection.git
51
+ repo_dir: gems
52
+ - name: concurrent-ruby
53
+ version: '1.1'
54
+ source:
55
+ type: git
56
+ name: ruby/gem_rbs_collection
57
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
58
+ remote: https://github.com/ruby/gem_rbs_collection.git
59
+ repo_dir: gems
60
+ - name: connection_pool
61
+ version: '2.4'
62
+ source:
63
+ type: git
64
+ name: ruby/gem_rbs_collection
65
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
66
+ remote: https://github.com/ruby/gem_rbs_collection.git
67
+ repo_dir: gems
68
+ - name: date
69
+ version: '0'
70
+ source:
71
+ type: stdlib
72
+ - name: delegate
73
+ version: '0'
74
+ source:
75
+ type: stdlib
76
+ - name: digest
77
+ version: '0'
78
+ source:
79
+ type: stdlib
80
+ - name: erb
81
+ version: '0'
82
+ source:
83
+ type: stdlib
84
+ - name: faker
85
+ version: 3.4.2
86
+ source:
87
+ type: git
88
+ name: ruby/gem_rbs_collection
89
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
90
+ remote: https://github.com/ruby/gem_rbs_collection.git
91
+ repo_dir: gems
92
+ - name: fileutils
93
+ version: '0'
94
+ source:
95
+ type: stdlib
96
+ - name: i18n
97
+ version: '1.10'
98
+ source:
99
+ type: git
100
+ name: ruby/gem_rbs_collection
101
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
102
+ remote: https://github.com/ruby/gem_rbs_collection.git
103
+ repo_dir: gems
104
+ - name: io-console
105
+ version: '0'
106
+ source:
107
+ type: stdlib
108
+ - name: json
109
+ version: '0'
110
+ source:
111
+ type: stdlib
112
+ - name: lint_roller
113
+ version: '1.1'
114
+ source:
115
+ type: git
116
+ name: ruby/gem_rbs_collection
117
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
118
+ remote: https://github.com/ruby/gem_rbs_collection.git
119
+ repo_dir: gems
120
+ - name: logger
121
+ version: '1.7'
122
+ source:
123
+ type: git
124
+ name: ruby/gem_rbs_collection
125
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
126
+ remote: https://github.com/ruby/gem_rbs_collection.git
127
+ repo_dir: gems
128
+ - name: minitest
129
+ version: '5.25'
130
+ source:
131
+ type: git
132
+ name: ruby/gem_rbs_collection
133
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
134
+ remote: https://github.com/ruby/gem_rbs_collection.git
135
+ repo_dir: gems
136
+ - name: monitor
137
+ version: '0'
138
+ source:
139
+ type: stdlib
140
+ - name: nokogiri
141
+ version: '1.11'
142
+ source:
143
+ type: git
144
+ name: ruby/gem_rbs_collection
145
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
146
+ remote: https://github.com/ruby/gem_rbs_collection.git
147
+ repo_dir: gems
148
+ - name: openssl
149
+ version: '0'
150
+ source:
151
+ type: stdlib
152
+ - name: parser
153
+ version: '3.2'
154
+ source:
155
+ type: git
156
+ name: ruby/gem_rbs_collection
157
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
158
+ remote: https://github.com/ruby/gem_rbs_collection.git
159
+ repo_dir: gems
160
+ - name: pp
161
+ version: '0'
162
+ source:
163
+ type: stdlib
164
+ - name: prettyprint
165
+ version: '0'
166
+ source:
167
+ type: stdlib
168
+ - name: rack
169
+ version: '2.2'
170
+ source:
171
+ type: git
172
+ name: ruby/gem_rbs_collection
173
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
174
+ remote: https://github.com/ruby/gem_rbs_collection.git
175
+ repo_dir: gems
176
+ - name: rails-dom-testing
177
+ version: '2.0'
178
+ source:
179
+ type: git
180
+ name: ruby/gem_rbs_collection
181
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
182
+ remote: https://github.com/ruby/gem_rbs_collection.git
183
+ repo_dir: gems
184
+ - name: rails-html-sanitizer
185
+ version: '1.6'
186
+ source:
187
+ type: git
188
+ name: ruby/gem_rbs_collection
189
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
190
+ remote: https://github.com/ruby/gem_rbs_collection.git
191
+ repo_dir: gems
192
+ - name: railties
193
+ version: '6.0'
194
+ source:
195
+ type: git
196
+ name: ruby/gem_rbs_collection
197
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
198
+ remote: https://github.com/ruby/gem_rbs_collection.git
199
+ repo_dir: gems
200
+ - name: rake
201
+ version: '13.0'
202
+ source:
203
+ type: git
204
+ name: ruby/gem_rbs_collection
205
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
206
+ remote: https://github.com/ruby/gem_rbs_collection.git
207
+ repo_dir: gems
208
+ - name: random-formatter
209
+ version: '0'
210
+ source:
211
+ type: stdlib
212
+ - name: rdoc
213
+ version: '0'
214
+ source:
215
+ type: stdlib
216
+ - name: regexp_parser
217
+ version: '2.8'
218
+ source:
219
+ type: git
220
+ name: ruby/gem_rbs_collection
221
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
222
+ remote: https://github.com/ruby/gem_rbs_collection.git
223
+ repo_dir: gems
224
+ - name: rubocop-ast
225
+ version: '1.46'
226
+ source:
227
+ type: git
228
+ name: ruby/gem_rbs_collection
229
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
230
+ remote: https://github.com/ruby/gem_rbs_collection.git
231
+ repo_dir: gems
232
+ - name: securerandom
233
+ version: '0'
234
+ source:
235
+ type: stdlib
236
+ - name: singleton
237
+ version: '0'
238
+ source:
239
+ type: stdlib
240
+ - name: socket
241
+ version: '0'
242
+ source:
243
+ type: stdlib
244
+ - name: stringio
245
+ version: '0'
246
+ source:
247
+ type: stdlib
248
+ - name: tempfile
249
+ version: '0'
250
+ source:
251
+ type: stdlib
252
+ - name: thor
253
+ version: '1.2'
254
+ source:
255
+ type: git
256
+ name: ruby/gem_rbs_collection
257
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
258
+ remote: https://github.com/ruby/gem_rbs_collection.git
259
+ repo_dir: gems
260
+ - name: time
261
+ version: '0'
262
+ source:
263
+ type: stdlib
264
+ - name: timeout
265
+ version: '0'
266
+ source:
267
+ type: stdlib
268
+ - name: tmpdir
269
+ version: '0'
270
+ source:
271
+ type: stdlib
272
+ - name: tsort
273
+ version: '0'
274
+ source:
275
+ type: stdlib
276
+ - name: tzinfo
277
+ version: '2.0'
278
+ source:
279
+ type: git
280
+ name: ruby/gem_rbs_collection
281
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
282
+ remote: https://github.com/ruby/gem_rbs_collection.git
283
+ repo_dir: gems
284
+ - name: uri
285
+ version: '0'
286
+ source:
287
+ type: stdlib
288
+ gemfile_lock_path: Gemfile.lock
@@ -0,0 +1,41 @@
1
+ # Download sources
2
+ sources:
3
+ - type: git
4
+ name: ruby/gem_rbs_collection
5
+ remote: https://github.com/ruby/gem_rbs_collection.git
6
+ revision: main
7
+ repo_dir: gems
8
+
9
+ # You can specify local directories as sources also.
10
+ # - type: local
11
+ # path: path/to/your/local/repository
12
+
13
+ # A directory to install the downloaded RBSs
14
+ path: .gem_rbs_collection
15
+
16
+ # gems:
17
+ # # If you want to avoid installing rbs files for gems, you can specify them here.
18
+ # - name: GEM_NAME
19
+ # ignore: true
20
+
21
+ gems:
22
+ - name: prism
23
+ ignore: true
24
+ - name: simplecov
25
+ ignore: true
26
+ - name: rspec
27
+ ignore: true
28
+ - name: rspec-core
29
+ ignore: true
30
+ - name: rspec-expectations
31
+ ignore: true
32
+ - name: rspec-mocks
33
+ ignore: true
34
+ - name: rspec-support
35
+ ignore: true
36
+ - name: rubocop
37
+ ignore: true
38
+ - name: steep
39
+ ignore: true
40
+ - name: rbs
41
+ ignore: true