• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revisionbb58292a1a5fa8aa8b71dba93c204572411be08f (tree)
Time2020-02-10 23:00:03
Authormiyakawataku
Commitermiyakawataku

Log Message

rename UTC_OFFSET.utc_offset? to UTC_OFFSET.is?

Change Summary

Incremental Difference

diff -r 5639bcad8169 -r bb58292a1a5f src/main/resources/kink-mods/kink/datetime/INSTANT.kn
--- a/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Sun Feb 09 14:26:24 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Mon Feb 10 23:00:03 2020 +0900
@@ -122,12 +122,9 @@
122122
123123 :Instant_syms <- Instant_trait.chunk(2).map{([:K :V]) K }
124124
125-## INSTANT.instant?(Val)
125+## INSTANT.is?(Val)
126126 #
127-# INSTANT.instant? returns whether Val is an instant val.
128-:instant? <- {(:Ins)
129- Ins.var_syms.have_all?(Instant_syms)
130-}
127+# INSTANT.is? returns whether Val is an instant val.
131128 :is? <- {(:Ins)
132129 Ins.var_syms.have_all?(Instant_syms)
133130 }
diff -r 5639bcad8169 -r bb58292a1a5f 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:26:24 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/OFFSET_DATE_TIME.kn Mon Feb 10 23:00:03 2020 +0900
@@ -218,7 +218,7 @@
218218 :new <- {(:Year :Month :Day :Hour :Minute :Second :Utc_offset)
219219 :Desc = 'OFFSET_DATE_TIME.new(Year Month Day Hour Minute Second Utc_offset)'
220220 _DATE_TIME_COMMON._check_ymdhms(Desc Year Month Day Hour Minute Second)
221- UTC_OFFSET.utc_offset?(Utc_offset) || raise(
221+ UTC_OFFSET.is?(Utc_offset) || raise(
222222 '{}: Utc_offset must be a utc_offset, but got {}'.format(Desc Utc_offset.repr))
223223
224224 :Second_int = Second // 1
@@ -278,9 +278,9 @@
278278 # stdout.print_line(Odt.repr) # => Offset_date_time(2020-01-21T13:20:43.123456789+09:00)
279279 :new_from_instant_and_utc_offset <- {(:Instant :Utc_offset)
280280 :Desc = 'OFFSET_DATE_TIME.new_from_instant_and_utc_offset(Instant Utc_offset)'
281- INSTANT.instant?(Instant) || raise(
281+ INSTANT.is?(Instant) || raise(
282282 '{}: Instant must be instant, but got {}'.format(Desc Instant.repr))
283- UTC_OFFSET.utc_offset?(Utc_offset) || raise(
283+ UTC_OFFSET.is?(Utc_offset) || raise(
284284 '{}: Utc_offset must be utc_offset, but got {}'.format(Desc Utc_offset.repr))
285285
286286 _from_instant_offset(Desc Instant Utc_offset)
@@ -312,7 +312,7 @@
312312 # stdout.print_line(Odt.repr) # => Offset_date_time(2020-01-20T20:20:43.123456789-08:00)
313313 :new_from_instant_and_timezone <- {(:Instant :Tz)
314314 :Desc = 'OFFSET_DATE_TIME.new_from_instant_and_timezone(Instant Tz)'
315- INSTANT.instant?(Instant) || raise(
315+ INSTANT.is?(Instant) || raise(
316316 '{}: Instant must be instant, but got {}'.format(Desc Instant.repr))
317317 TIMEZONE.is?(Tz) || raise(
318318 '{}: Tz must be timezone, but got {}'.format(Desc Tz.repr))
@@ -344,7 +344,7 @@
344344 :new_from_date_time_and_utc_offset <- {(:Dt :Utc_offset)
345345 :Desc = 'OFFSET_DATE_TIME.new_from_date_time_and_utc_offset(Dt Utc_offset)'
346346 DATE_TIME.is?(Dt) || raise('{}: Dt must be date_time, but got {}'.format(Desc Dt.repr))
347- UTC_OFFSET.utc_offset?(Utc_offset) || raise(
347+ UTC_OFFSET.is?(Utc_offset) || raise(
348348 '{}: Utc_offset must be utc_offset, but got {}'.format(Desc Utc_offset.repr))
349349
350350 _from_dt_offset(Desc Dt Utc_offset)
diff -r 5639bcad8169 -r bb58292a1a5f src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn
--- a/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Sun Feb 09 14:26:24 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Mon Feb 10 23:00:03 2020 +0900
@@ -36,7 +36,7 @@
3636 #
3737 # • Instant must be an instant.
3838 'utc_offset_for_instant' {[:Tz](:Instant)
39- INSTANT.instant?(Instant) || raise(
39+ INSTANT.is?(Instant) || raise(
4040 'Tz.utc_offset_for_instant(Instant): Instant must be instant, but got {}'
4141 .format(Instant.repr))
4242 :Rules = Tz.Java_tz.call_method('getRules' [])
diff -r 5639bcad8169 -r bb58292a1a5f src/main/resources/kink-mods/kink/datetime/UTC_OFFSET.kn
--- a/src/main/resources/kink-mods/kink/datetime/UTC_OFFSET.kn Sun Feb 09 14:26:24 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/UTC_OFFSET.kn Mon Feb 10 23:00:03 2020 +0900
@@ -168,10 +168,10 @@
168168 )
169169 }
170170
171-## UTC_OFFSET.utc_offset?(Val)
171+## UTC_OFFSET.is?(Val)
172172 #
173-# “utc_offset?” fun returns whether Val is a utc_offset.
174-:utc_offset? <- {(:Val)
173+# UTC_OFFSET.is? returns whether Val is a utc_offset.
174+:is? <- {(:Val)
175175 Val.var_syms.have_all?(Utc_offset_syms)
176176 }
177177
diff -r 5639bcad8169 -r bb58292a1a5f src/test/kink/datetime/INSTANT_test.kn
--- a/src/test/kink/datetime/INSTANT_test.kn Sun Feb 09 14:26:24 2020 +0900
+++ b/src/test/kink/datetime/INSTANT_test.kn Mon Feb 10 23:00:03 2020 +0900
@@ -153,7 +153,7 @@
153153 TEST.group('INSTANT.now'){ # {{{1
154154 TEST.test('returns an instant'){
155155 :Now = INSTANT.now
156- INSTANT.instant?(Now) || raise('got {}'.format(Now.repr))
156+ INSTANT.is?(Now) || raise('got {}'.format(Now.repr))
157157 }
158158
159159 TEST.test('produce typical val'){
diff -r 5639bcad8169 -r bb58292a1a5f src/test/kink/datetime/UTC_OFFSET_test.kn
--- a/src/test/kink/datetime/UTC_OFFSET_test.kn Sun Feb 09 14:26:24 2020 +0900
+++ b/src/test/kink/datetime/UTC_OFFSET_test.kn Mon Feb 10 23:00:03 2020 +0900
@@ -61,13 +61,13 @@
6161 }
6262
6363 # }}}1
64-TEST.group('UTC_OFFSET.utc_offset?'){ # {{{1
64+TEST.group('UTC_OFFSET.is?'){ # {{{1
6565 TEST.test('false for nada'){
66- UTC_OFFSET.utc_offset?(nada) && raise('got true')
66+ UTC_OFFSET.is?(nada) && raise('got true')
6767 }
6868
6969 TEST.test('true for utc_offset'){
70- UTC_OFFSET.utc_offset?(UTC_OFFSET.new(0)) || raise('got false')
70+ UTC_OFFSET.is?(UTC_OFFSET.new(0)) || raise('got false')
7171 }
7272 }
7373
Show on old repository browser