• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revision5639bcad816919358645f0a2ccfb3749374fd478 (tree)
Time2020-02-09 14:26:24
Authormiyakawataku
Commitermiyakawataku

Log Message

rename TIMEZONE.timezone? to TIMEZONE.is?

Change Summary

Incremental Difference

diff -r 3d11421ca45a -r 5639bcad8169 src/main/resources/kink-mods/kink/datetime/OFFSET_DATE_TIME.kn
--- a/src/main/resources/kink-mods/kink/datetime/OFFSET_DATE_TIME.kn Sun Feb 09 14:17:25 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/OFFSET_DATE_TIME.kn Sun Feb 09 14:26:24 2020 +0900
@@ -314,7 +314,7 @@
314314 :Desc = 'OFFSET_DATE_TIME.new_from_instant_and_timezone(Instant Tz)'
315315 INSTANT.instant?(Instant) || raise(
316316 '{}: Instant must be instant, but got {}'.format(Desc Instant.repr))
317- TIMEZONE.timezone?(Tz) || raise(
317+ TIMEZONE.is?(Tz) || raise(
318318 '{}: Tz must be timezone, but got {}'.format(Desc Tz.repr))
319319
320320 :Utc_offset = Tz.utc_offset_for_instant(Instant)
diff -r 3d11421ca45a -r 5639bcad8169 src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn
--- a/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Sun Feb 09 14:17:25 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Sun Feb 09 14:26:24 2020 +0900
@@ -201,10 +201,10 @@
201201 )
202202 }
203203
204-## TIMEZONE.timezone?(Val)
204+## TIMEZONE.is?(Val)
205205 #
206-# timezone? returns whether Val is a timezone.
207-:timezone? <- {(:Val)
206+# TIMEZONE.is? returns whether Val is a timezone.
207+:is? <- {(:Val)
208208 Val:Java_tz.nonempty?
209209 }
210210
diff -r 3d11421ca45a -r 5639bcad8169 src/test/kink/datetime/TIMEZONE_test.kn
--- a/src/test/kink/datetime/TIMEZONE_test.kn Sun Feb 09 14:17:25 2020 +0900
+++ b/src/test/kink/datetime/TIMEZONE_test.kn Sun Feb 09 14:26:24 2020 +0900
@@ -176,21 +176,21 @@
176176 }
177177
178178 # }}}1
179-TEST.group('TIMEZONE.timezone?'){ # {{{1
179+TEST.group('TIMEZONE.is?'){ # {{{1
180180 TEST.test('true for timezone'){
181181 :Tz = TIMEZONE.find('Asia/Tokyo')
182- TIMEZONE.timezone?(Tz) || raise('got false')
182+ TIMEZONE.is?(Tz) || raise('got false')
183183 }
184184
185185 TEST.test('false for nada'){
186- TIMEZONE.timezone?(nada) && raise('got true')
186+ TIMEZONE.is?(nada) && raise('got true')
187187 }
188188 }
189189
190190 # }}}1
191191 TEST.test('TIMEZONE.default'){ # {{{1
192192 :Tz = TIMEZONE.default
193- TIMEZONE.timezone?(Tz) || raise('got {}'.format(Tz.repr))
193+ TIMEZONE.is?(Tz) || raise('got {}'.format(Tz.repr))
194194 }
195195
196196 # }}}1
Show on old repository browser