• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revisionefd80ca26853f2636ba339910abb3a32f302a3d8 (tree)
Time2020-02-09 13:52:42
Authormiyakawataku
Commitermiyakawataku

Log Message

rename DATE_TIME.date_time? to DATE_TIME.is?

Change Summary

Incremental Difference

diff -r b3aeb229a31f -r efd80ca26853 src/main/resources/kink-mods/kink/datetime/DATE_TIME.kn
--- a/src/main/resources/kink-mods/kink/datetime/DATE_TIME.kn Sun Feb 09 13:44:44 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/DATE_TIME.kn Sun Feb 09 13:52:42 2020 +0900
@@ -197,10 +197,10 @@
197197 )
198198 }
199199
200-## DATE_TIME.date_time?(Val)
200+## DATE_TIME.is?(Val)
201201 #
202-# “date_time?” returns whether Val is a date_time val.
203-:date_time? <- {(:Val)
202+# DATE_TIME.is? returns whether Val is a date_time val.
203+:is? <- {(:Val)
204204 Val.var_syms.have_all?(Date_time_syms)
205205 }
206206
diff -r b3aeb229a31f -r efd80ca26853 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 13:44:44 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/OFFSET_DATE_TIME.kn Sun Feb 09 13:52:42 2020 +0900
@@ -343,7 +343,7 @@
343343 # stdout.print_line(Odt.repr) # => Offset_date_time(2020-01-21T13:20:43.123456789+09:00)
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)'
346- DATE_TIME.date_time?(Dt) || raise('{}: Dt must be date_time, but got {}'.format(Desc Dt.repr))
346+ DATE_TIME.is?(Dt) || raise('{}: Dt must be date_time, but got {}'.format(Desc Dt.repr))
347347 UTC_OFFSET.utc_offset?(Utc_offset) || raise(
348348 '{}: Utc_offset must be utc_offset, but got {}'.format(Desc Utc_offset.repr))
349349
diff -r b3aeb229a31f -r efd80ca26853 src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn
--- a/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Sun Feb 09 13:44:44 2020 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/TIMEZONE.kn Sun Feb 09 13:52:42 2020 +0900
@@ -66,7 +66,7 @@
6666 # the fun tail-calls $gap_cont with the offset before the transition,
6767 # and the offset after the transition.
6868 'utc_offset_for_date_time' {[:Tz](:Date_time :single_cont :overlap_cont :gap_cont)
69- DATE_TIME.date_time?(Date_time) || raise(
69+ DATE_TIME.is?(Date_time) || raise(
7070 ( 'Tz.utc_offset_for_date_time(Date_time $single_cont $overlap_cont $gap_cont):'
7171 + ' Date_time must be date_time, but got {}').format(Date_time.repr))
7272 :Rules = Tz.Java_tz.call_method('getRules' [])
diff -r b3aeb229a31f -r efd80ca26853 src/test/kink/datetime/DATE_TIME_test.kn
--- a/src/test/kink/datetime/DATE_TIME_test.kn Sun Feb 09 13:44:44 2020 +0900
+++ b/src/test/kink/datetime/DATE_TIME_test.kn Sun Feb 09 13:52:42 2020 +0900
@@ -434,14 +434,14 @@
434434 }
435435
436436 # }}}1
437-TEST.group('DATE_TIME.date_time?'){ # {{{1
437+TEST.group('DATE_TIME.is?'){ # {{{1
438438 TEST.test('false for nada'){
439- DATE_TIME.date_time?(nada) && raise('got true')
439+ DATE_TIME.is?(nada) && raise('got true')
440440 }
441441
442442 TEST.test('false for nada'){
443443 :Dt = DATE_TIME.new(2020 1 9 20 26 02)
444- DATE_TIME.date_time?(Dt) || raise('got false')
444+ DATE_TIME.is?(Dt) || raise('got false')
445445 }
446446 }
447447
Show on old repository browser