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,9 @@
1
+ ---
2
+ name: thor
3
+ version: '1.2'
4
+ source:
5
+ type: git
6
+ name: ruby/gem_rbs_collection
7
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
8
+ remote: https://github.com/ruby/gem_rbs_collection.git
9
+ repo_dir: gems
@@ -0,0 +1,62 @@
1
+ class Thor
2
+ class Group
3
+ end
4
+
5
+ module Actions
6
+ class CreateFile
7
+ end
8
+
9
+ def create_file: (String destination, String data, ?verbose: bool) -> String
10
+ | (String destination, ?verbose: bool) { () -> String } -> String
11
+ end
12
+
13
+ class Error
14
+ end
15
+
16
+ module Base
17
+ attr_accessor options: Hash[String | Symbol, untyped]
18
+ end
19
+
20
+ module Base
21
+ module ClassMethods
22
+ def class_option: (
23
+ Symbol | String name,
24
+ ?aliases: String | Symbol | Array[String | Symbol],
25
+ ?banner: String,
26
+ ?default: untyped,
27
+ ?desc: String,
28
+ ?group: untyped,
29
+ ?hide: untyped,
30
+ ?required: bool,
31
+ ?type: :string | :hash | :array | :numeric | :boolean,
32
+ **untyped
33
+ ) -> void
34
+ end
35
+ end
36
+
37
+ include Base
38
+ extend Base::ClassMethods
39
+
40
+ def self.desc: (
41
+ String usage,
42
+ String description,
43
+ ?options: Hash[Symbol, untyped]
44
+ ) -> void
45
+
46
+ def self.method_option: (
47
+ Symbol | String name,
48
+ ?aliases: String | Symbol | Array[String | Symbol],
49
+ ?banner: String,
50
+ ?default: untyped,
51
+ ?lazy_default: untyped,
52
+ ?desc: String,
53
+ ?required: bool,
54
+ ?type: :string | :hash | :array | :numeric | :boolean,
55
+ ?enum: untyped,
56
+ ?repeatable: bool,
57
+ **untyped
58
+ ) -> void
59
+ alias self.option self.method_option
60
+
61
+ def self.no_commands: () { () -> void } -> void
62
+ end
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: tzinfo
3
+ version: '2.0'
4
+ source:
5
+ type: git
6
+ name: ruby/gem_rbs_collection
7
+ revision: 82762423fc5694b82888ea89a972847cf19838c2
8
+ remote: https://github.com/ruby/gem_rbs_collection.git
9
+ repo_dir: gems
@@ -0,0 +1,7 @@
1
+ # manifest.yaml describes dependencies which do not appear in the gemspec.
2
+ # If this gem includes such dependencies, comment-out the following lines and
3
+ # declare the dependencies.
4
+ # If all dependencies appear in the gemspec, you should remove this file.
5
+ #
6
+ dependencies:
7
+ - name: date
@@ -0,0 +1,600 @@
1
+ module TZInfo
2
+ VERSION: ::String
3
+
4
+ def self.eager_load!: () -> void
5
+
6
+ class Country
7
+ include ::Comparable
8
+
9
+ def self.all: () -> ::Array[Country]
10
+
11
+ def self.all_codes: () -> ::Array[::String]
12
+
13
+ def self.get: (::String code) -> Country
14
+
15
+ def self._load: (::String data) -> Country
16
+
17
+ def initialize: (untyped info) -> void
18
+
19
+ def <=>: (Country c) -> (-1 | 0 | 1)
20
+ | (untyped c) -> nil
21
+
22
+ def =~: (::Regexp regexp) -> ::Integer?
23
+
24
+ def _dump: (::Integer limit) -> ::String
25
+
26
+ def code: () -> ::String
27
+
28
+ def eql?: (untyped c) -> bool
29
+
30
+ def hash: () -> ::Integer
31
+
32
+ def inspect: () -> ::String
33
+
34
+ def name: () -> ::String
35
+
36
+ def to_s: () -> ::String
37
+
38
+ def zone_identifiers: () -> ::Array[::String]
39
+
40
+ def zone_info: () -> ::Array[CountryTimezone]
41
+
42
+ def zones: () -> ::Array[Timezone]
43
+
44
+ alias zone_names zone_identifiers
45
+ end
46
+
47
+ class CountryTimezone
48
+ attr_reader description: ::String?
49
+
50
+ attr_reader identifier: ::String
51
+
52
+ attr_reader latitude: ::Rational
53
+
54
+ attr_reader longitude: ::Rational
55
+
56
+ def initialize: (::String identifier, ::Rational latitude, ::Rational longitude, ?::String? description) -> void
57
+
58
+ def ==: (untyped ct) -> bool
59
+
60
+ def description_or_friendly_identifier: () -> ::String
61
+
62
+ def eql?: (untyped ct) -> bool
63
+
64
+ def hash: () -> ::Integer
65
+
66
+ def timezone: () -> Timezone
67
+ end
68
+
69
+ class DataSource
70
+ def self.get: () -> DataSource
71
+
72
+ def self.set: (:ruby data_source_or_type) -> void
73
+ | (:zoneinfo data_source_or_type, ?::String? zoneinfo_dir, ?::String? iso3166_tab_file) -> void
74
+ | (DataSource data_source_or_type) -> void
75
+
76
+ def country_codes: () -> ::Array[::String]
77
+
78
+ def timezone_identifier_encoding: () -> ::Array[::String]
79
+
80
+ def eager_load!: () -> void
81
+
82
+ def get_country_info: (::String code) -> DataSources::CountryInfo
83
+
84
+ def get_timezone_info: (::String identifier) -> DataSources::TimezoneInfo
85
+
86
+ def inspect: () -> ::String
87
+
88
+ def linked_timezone_identifiers: () -> ::Array[::String]
89
+
90
+ def timezone_identifiers: () -> ::Array[::String]
91
+
92
+ def to_s: () -> ::String
93
+ end
94
+
95
+ class DataTimezone < InfoTimezone
96
+ def canonical_zone: () -> self
97
+
98
+ def period_for: ((::Time | ::DateTime | Timestamp) time) -> TimezonePeriod
99
+
100
+ def periods_for_local: ((::Time | ::DateTime | Timestamp) local_time) -> ::Array[TimezonePeriod]
101
+
102
+ def transitions_up_to: ((::Time | ::DateTime | Timestamp) to, ?(::Time | ::DateTime | Timestamp)? from) -> ::Array[TimezoneTransition]
103
+ end
104
+
105
+ class DateTimeWithOffset < ::DateTime
106
+ include WithOffset
107
+
108
+ attr_reader timezone_offset: TimezoneOffset
109
+
110
+ def england: () -> DateTimeWithOffset
111
+
112
+ def gregorian: () -> DateTimeWithOffset
113
+
114
+ def italy: () -> DateTimeWithOffset
115
+
116
+ def julian: () -> DateTimeWithOffset
117
+
118
+ def new_start: (?Integer start) -> DateTimeWithOffset
119
+
120
+ def set_timezone_offset: (TimezoneOffset timezone_offset) -> self
121
+
122
+ def to_time: () -> ::Time
123
+ end
124
+
125
+ class InfoTimezone < Timezone
126
+ def identifier: () -> ::String
127
+ end
128
+
129
+ class LinkedTimezone < InfoTimezone
130
+ def canonical_zone: () -> Timezone
131
+
132
+ def period_for: ((::Time | ::DateTime | Timestamp) time) -> TimezonePeriod
133
+
134
+ def periods_for_local: ((::Time | ::DateTime | Timestamp) local_time) -> ::Array[TimezonePeriod]
135
+
136
+ def transitions_up_to: ((::Time | ::DateTime | Timestamp) to, ?(::Time | ::DateTime | Timestamp)? from) -> ::Array[TimezoneTransition]
137
+ end
138
+
139
+ class OffsetTimezonePeriod < TimezonePeriod
140
+ def initialize: (TimezoneOffset offset) -> void
141
+
142
+ def ==: (untyped p) -> bool
143
+
144
+ def end_transition: () -> nil
145
+
146
+ def hash: () -> ::Integer
147
+
148
+ def start_transition: () -> nil
149
+
150
+ alias eql? ==
151
+ end
152
+
153
+ class TimeWithOffset < ::Time
154
+ include WithOffset
155
+
156
+ attr_reader timezone_offset: TimezoneOffset
157
+
158
+ def dst?: () -> bool
159
+
160
+ def getlocal: (*untyped args) -> ::Time
161
+
162
+ def gmtime: () -> self
163
+
164
+ def localtime: (*untyped args) -> self
165
+
166
+ def round: (?::Integer ndigits) -> ::Time
167
+
168
+ def set_timezone_offset: (untyped timezone_offset) -> self
169
+
170
+ def to_a: () -> [ Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, bool, String? ]
171
+
172
+ def to_datetime: () -> ::DateTime
173
+
174
+ def utc: () -> self
175
+
176
+ def zone: () -> ::String
177
+
178
+ alias isdst dst?
179
+ end
180
+
181
+ class Timestamp
182
+ include ::Comparable
183
+
184
+ attr_reader sub_second: (::Rational | 0)
185
+
186
+ attr_reader utc_offset: ::Integer?
187
+
188
+ attr_reader value: ::Integer
189
+
190
+ def self.create: (::Integer year, ?::Integer month, ?::Integer day, ?::Integer hour, ?::Integer minute, ?::Integer second, ?(::Rational | 0) sub_second, ?(::Integer | :utc)? utc_offset) -> Timestamp
191
+
192
+ def self.for: ((::Time | ::DateTime | Timestamp) value, ?(:preserve | :ignore | :treat_as_utc) offset) -> Timestamp
193
+ | (::Time value, ?(:preserve | :ignore | :treat_as_utc) offset) { (Timestamp) -> Timestamp } -> ::Time
194
+ | (::DateTime value, ?(:preserve | :ignore | :treat_as_utc) offset) { (Timestamp) -> Timestamp } -> ::DateTime
195
+ | (Timestamp value, ?(:preserve | :ignore | :treat_as_utc) offset) { (Timestamp) -> Timestamp } -> Timestamp
196
+
197
+ def self.utc: (::Integer value, ?(::Rational | 0) sub_second) -> untyped
198
+
199
+ def <=>: (Timestamp t) -> (-1 | 0 | 1)?
200
+ | (untyped t) -> nil
201
+
202
+ def add_and_set_utc_offset: (::Integer seconds, (::Integer | :utc)? utc_offset) -> Timestamp
203
+
204
+ def hash: () -> ::Integer
205
+
206
+ def inspect: () -> ::String
207
+
208
+ def strftime: (::String format) -> ::String
209
+
210
+ def to_datetime: () -> ::DateTime
211
+
212
+ def to_i: () -> ::Integer
213
+
214
+ def to_s: () -> ::String
215
+
216
+ def to_time: () -> ::Time
217
+
218
+ def utc: () -> Timestamp
219
+
220
+ def utc?: () -> bool?
221
+ end
222
+
223
+ class TimestampWithOffset < Timestamp
224
+ include WithOffset
225
+
226
+ attr_reader timezone_offset: TimezoneOffset
227
+
228
+ def self.set_timezone_offset: (Timestamp timestamp, TimezoneOffset timezone_offset) -> TimestampWithOffset
229
+
230
+ def set_timezone_offset: (TimezoneOffset timezone_offset) -> self
231
+
232
+ def to_datetime: () -> ::DateTime
233
+
234
+ def to_time: () -> ::Time
235
+ end
236
+
237
+ class Timezone
238
+ include ::Comparable
239
+
240
+ def self._load: (::String data) -> Timezone
241
+
242
+ def self.all: () -> ::Array[Timezone]
243
+
244
+ def self.all_country_zone_identifiers: () -> ::Array[::String]
245
+
246
+ def self.all_country_zones: () -> ::Array[Timezone]
247
+
248
+ def self.all_data_zone_identifiers: () -> ::Array[::String]
249
+
250
+ def self.all_data_zones: () -> ::Array[Timezone]
251
+
252
+ def self.all_identifiers: () -> ::Array[::String]
253
+
254
+ def self.all_linked_zone_identifiers: () -> ::Array[::String]
255
+
256
+ def self.all_linked_zones: () -> ::Array[Timezone]
257
+
258
+ def self.default_dst: () -> bool?
259
+
260
+ def self.default_dst=: (bool? value) -> void
261
+
262
+ def self.get: (::String identifier) -> Timezone
263
+
264
+ def self.get_proxy: (::String identifier) -> TimezoneProxy
265
+
266
+ def <=>: (Timezone tz) -> (1 | 0 | -1)
267
+ | (untyped) -> nil
268
+
269
+ def =~: (::Regexp regexp) -> ::Integer?
270
+
271
+ def _dump: (::Integer limit) -> ::String
272
+
273
+ def abbreviation: (?(::Time | ::DateTime | Timestamp) time) -> ::String
274
+
275
+ def base_utc_offset: (?(::Time | ::DateTime | Timestamp) time) -> ::Integer
276
+
277
+ def canonical_identifier: () -> ::String
278
+
279
+ def canonical_zone: () -> Timezone
280
+
281
+ def current_period: () -> TimezonePeriod
282
+
283
+ def current_time_and_period: () -> [ TimeWithOffset, TimezonePeriod ]
284
+
285
+ def dst?: (?(::Time | ::DateTime | Timestamp) time) -> bool
286
+
287
+ def eql?: (untyped tz) -> bool
288
+
289
+ def friendly_identifier: (?bool skip_first_part) -> ::String
290
+
291
+ def hash: () -> ::Integer
292
+
293
+ def identifier: () -> ::String
294
+
295
+ def inspect: () -> ::String
296
+
297
+ def local_datetime: (::Integer year, ?::Integer month, ?::Integer day, ?::Integer hour, ?::Integer minute, ?::Integer second, ?(::Rational | 0) sub_second, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> DateTimeWithOffset
298
+
299
+ def local_time: (::Integer year, ?::Integer month, ?::Integer day, ?::Integer hour, ?::Integer minute, ?::Integer second, ?(::Rational | 0) sub_second, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> TimeWithOffset
300
+
301
+ def local_timestamp: (::Integer year, ?::Integer month, ?::Integer day, ?::Integer hour, ?::Integer minute, ?::Integer second, ?(::Rational | 0) sub_second, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> TimestampWithOffset
302
+
303
+ def local_to_utc: (::Time local_time, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> ::Time
304
+ | (::DateTime local_time, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> ::DateTime
305
+ | (Timestamp local_time, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> Timestamp
306
+
307
+ def name: () -> ::String
308
+
309
+ def now: () -> TimeWithOffset
310
+
311
+ def observed_utc_offset: (?(::Time | ::DateTime | Timestamp) time) -> ::Integer
312
+
313
+ def offsets_up_to: ((::Time | ::DateTime | Timestamp) to, ?(::Time | ::DateTime | Timestamp)? from) -> ::Array[TimezoneOffset]
314
+
315
+ def period_for: ((::Time | ::DateTime | Timestamp) time) -> TimezonePeriod
316
+
317
+ def period_for_local: ((::Time | ::DateTime | Timestamp) local_time, ?bool? dst) ?{ (::Array[TimezonePeriod]) -> (TimezonePeriod | ::Array[TimezonePeriod])? } -> TimezonePeriod
318
+
319
+ def period_for_utc: ((::Time | ::DateTime | Timestamp) utc_time) -> TimezonePeriod
320
+
321
+ def periods_for_local: ((::Time | ::DateTime | Timestamp) local_time) -> ::Array[TimezonePeriod]
322
+
323
+ def strftime: (::String format, ?(::Time | ::DateTime | Timestamp) time) -> ::String
324
+
325
+ def to_local: (::Time time) -> TimeWithOffset
326
+ | (::DateTime time) -> DateTimeWithOffset
327
+ | (Timestamp time) -> TimestampWithOffset
328
+
329
+ def to_s: () -> ::String
330
+
331
+ def transitions_up_to: ((::Time | ::DateTime | Timestamp) to, ?(::Time | ::DateTime | Timestamp)? from) -> ::Array[TimezoneTransition]
332
+
333
+ def utc_to_local: (::Time time) -> TimeWithOffset
334
+ | (::DateTime time) -> DateTimeWithOffset
335
+ | (Timestamp time) -> TimestampWithOffset
336
+
337
+ alias abbr abbreviation
338
+
339
+ alias current_period_and_time current_time_and_period
340
+
341
+ alias utc_offset observed_utc_offset
342
+ end
343
+
344
+ class TimezoneOffset
345
+ attr_reader abbreviation: untyped
346
+
347
+ attr_reader base_utc_offset: untyped
348
+
349
+ attr_reader observed_utc_offset: untyped
350
+
351
+ attr_reader std_offset: untyped
352
+
353
+ def initialize: (::Integer base_utc_offset, ::Integer std_offset, ::String abbreviation) -> void
354
+
355
+ def ==: (untyped toi) -> bool
356
+
357
+ def dst?: () -> bool
358
+
359
+ def eql?: (untyped toi) -> bool
360
+
361
+ def hash: () -> ::Integer
362
+
363
+ def inspect: () -> ::String
364
+
365
+ alias abbr abbreviation
366
+
367
+ alias utc_offset base_utc_offset
368
+
369
+ alias utc_total_offset observed_utc_offset
370
+ end
371
+
372
+ class TimezonePeriod
373
+ attr_reader offset: TimezoneOffset
374
+
375
+ def abbreviation: () -> ::String
376
+
377
+ def base_utc_offset: () -> ::Integer
378
+
379
+ def dst?: () -> bool
380
+
381
+ def end_transition: () -> TimezoneTransition?
382
+
383
+ def ends_at: () -> Timestamp?
384
+
385
+ def local_ends_at: () -> TimestampWithOffset?
386
+
387
+ def local_starts_at: () -> TimestampWithOffset?
388
+
389
+ def observed_utc_offset: () -> ::Integer
390
+
391
+ def start_transition: () -> TimezoneTransition?
392
+
393
+ def starts_at: () -> Timestamp?
394
+
395
+ def std_offset: () -> ::Integer
396
+
397
+ alias abbr abbreviation
398
+
399
+ alias zone_identifier abbreviation
400
+
401
+ alias utc_offset base_utc_offset
402
+
403
+ alias utc_total_offset observed_utc_offset
404
+ end
405
+
406
+ class TimezoneProxy < Timezone
407
+ def initialize: (::String identifier) -> void
408
+
409
+ def self._load: (::String data) -> TimezoneProxy
410
+
411
+ def _dump: (::Integer limit) -> ::String
412
+
413
+ def canonical_zone: () -> Timezone
414
+
415
+ def identifier: () -> ::String
416
+
417
+ def period_for: ((::Time | ::DateTime | Timestamp) time) -> TimezonePeriod
418
+
419
+ def periods_for_local: ((::Time | ::DateTime | Timestamp) local_time) -> ::Array[TimezonePeriod]
420
+
421
+ def transitions_up_to: ((::Time | ::DateTime | Timestamp) to, ?(::Time | ::DateTime | Timestamp)? from) -> ::Array[TimezoneTransition]
422
+ end
423
+
424
+ class TimezoneTransition
425
+ attr_reader offset: TimezoneOffset
426
+
427
+ attr_reader previous_offset: TimezoneOffset
428
+
429
+ attr_reader timestamp_value: ::Integer
430
+
431
+ def initialize: (TimezoneOffset offset, TimezoneOffset previous_offset, ::Integer timestamp_value) -> void
432
+
433
+ def ==: (untyped tti) -> bool
434
+
435
+ def at: () -> Timestamp
436
+
437
+ def hash: () -> ::Integer
438
+
439
+ def local_end_at: () -> TimestampWithOffset
440
+
441
+ def local_start_at: () -> TimestampWithOffset
442
+
443
+ alias eql? ==
444
+ end
445
+
446
+ class TransitionsTimezonePeriod < TimezonePeriod
447
+ attr_reader end_transition: TimezoneTransition
448
+
449
+ attr_reader start_transition: TimezoneTransition
450
+
451
+ def initialize: (TimezoneTransition start_transition, TimezoneTransition end_transition) -> void
452
+
453
+ def ==: (untyped p) -> bool
454
+
455
+ def hash: () -> ::Integer
456
+
457
+ def inspect: () -> ::String
458
+
459
+ alias eql? ==
460
+ end
461
+
462
+ module WithOffset
463
+ def strftime: (::String format) -> ::String
464
+ end
465
+
466
+ module DataSources
467
+ class ConstantOffsetDataTimezoneInfo < DataTimezoneInfo
468
+ attr_reader constant_offset: TimezoneOffset
469
+
470
+ def initialize: (untyped identifier, untyped constant_offset) -> void
471
+
472
+ def period_for: (untyped timestamp) -> TimezonePeriod
473
+
474
+ def periods_for_local: (untyped local_timestamp) -> ::Array[TimezonePeriod]
475
+
476
+ def transitions_up_to: (untyped to_timestamp, ?untyped? from_timestamp) -> [ ]
477
+ end
478
+
479
+ class CountryInfo
480
+ attr_reader code: ::String
481
+
482
+ attr_reader name: ::String
483
+
484
+ attr_reader zones: ::Array[CountryTimezone]
485
+
486
+ def initialize: (::String code, ::String name, ::Array[CountryTimezone] zones) -> void
487
+
488
+ def inspect: () -> ::String
489
+ end
490
+
491
+ class DataTimezoneInfo < TimezoneInfo
492
+ def create_timezone: () -> DataTimezone
493
+
494
+ def period_for: (Timestamp timestamp) -> TimezonePeriod
495
+
496
+ def periods_for_local: (Timestamp local_timestamp) -> ::Array[TimezonePeriod]
497
+
498
+ def transitions_up_to: (Timestamp to_timestamp, ?Timestamp? from_timestamp) -> ::Array[TimezoneTransition]
499
+ end
500
+
501
+ class LinkedTimezoneInfo < TimezoneInfo
502
+ attr_reader link_to_identifier: ::String
503
+
504
+ def initialize: (::String identifier, ::String link_to_identifier) -> void
505
+
506
+ def create_timezone: () -> LinkedTimezone
507
+ end
508
+
509
+ class RubyDataSource < DataSource
510
+ attr_reader data_timezone_identifiers: ::Array[::String]
511
+
512
+ attr_reader linked_timezone_identifiers: ::Array[::String]
513
+
514
+ attr_reader country_codes: ::Array[::String]
515
+
516
+ def initialize: () -> void
517
+
518
+ def inspect: () -> ::String
519
+
520
+ def to_s: () -> ::String
521
+ end
522
+
523
+ class TimezoneInfo
524
+ attr_reader identifier: ::String
525
+
526
+ def inspect: () -> ::String
527
+
528
+ def create_timezone: () -> Timezone
529
+ end
530
+
531
+ class TransitionsDataTimezoneInfo < DataTimezoneInfo
532
+ attr_reader transitions: ::Array[TimezoneTransition]
533
+
534
+ def initialize: (::String identifier, ::Array[TimezoneTransition] transitions) -> void
535
+
536
+ def period_for: (Timestamp timestamp) -> TimezonePeriod
537
+
538
+ def periods_for_local: (Timestamp local_timestamp) -> TimezonePeriod
539
+
540
+ def transitions_up_to: (Timestamp to_timestamp, ?Timestamp? from_timestamp) -> ::Array[TimezoneTransition]
541
+ end
542
+
543
+ class ZoneinfoDataSource < DataSource
544
+ attr_reader country_codes: ::Array[::String]
545
+
546
+ attr_reader zoneinfo_dir: ::String
547
+
548
+ def self.alternate_iso3166_tab_search_path: () -> ::Array[::String]
549
+
550
+ def self.alternate_iso3166_tab_search_path=: ((::Array[::String] | ::String)? alternate_iso3166_tab_search_path) -> void
551
+
552
+ def self.search_path: () -> ::Array[::String]
553
+
554
+ def self.search_path=: ((::Array[::String] | ::String)? search_path) -> void
555
+
556
+ def initialize: (?::String? zoneinfo_dir, ?::String? alternate_iso3166_tab_path) -> void
557
+
558
+ def data_timezone_identifiers: () -> ::Array[::String]
559
+
560
+ def inspect: () -> ::String
561
+
562
+ def linked_timezone_identifiers: () -> [ ]
563
+
564
+ def to_s: () -> ::String
565
+ end
566
+
567
+ class InvalidZoneinfoDirectory < StandardError
568
+ end
569
+
570
+ class InvalidZoneinfoFile < StandardError
571
+ end
572
+
573
+ class TZInfoDataNotFound < StandardError
574
+ end
575
+
576
+ class ZoneinfoDirectoryNotFound < StandardError
577
+ end
578
+ end
579
+
580
+ class AmbiguousTime < StandardError
581
+ end
582
+
583
+ class DataSourceNotFound < StandardError
584
+ end
585
+
586
+ class InvalidCountryCode < StandardError
587
+ end
588
+
589
+ class InvalidDataSource < StandardError
590
+ end
591
+
592
+ class InvalidTimezoneIdentifier < StandardError
593
+ end
594
+
595
+ class PeriodNotFound < StandardError
596
+ end
597
+
598
+ class UnknownTimezone < StandardError
599
+ end
600
+ end
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 4.0
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 4.0.6
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2026-08-04
4
+
5
+ - Initial release