• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revisionc7ff0eeee6b9303a5b2848f986d73757f85f2081 (tree)
Time2019-11-25 22:15:58
Authormiyakawataku
Commitermiyakawataku

Log Message

improve implementation of comparation methods of instant

Change Summary

Incremental Difference

diff -r 66a6a003db51 -r c7ff0eeee6b9 src/main/resources/kink-mods/kink/datetime/INSTANT.kn
--- a/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Mon Nov 25 22:10:19 2019 +0900
+++ b/src/main/resources/kink-mods/kink/datetime/INSTANT.kn Mon Nov 25 22:15:58 2019 +0900
@@ -4,6 +4,7 @@
44
55 :Nano_to_sec <- NUM.new(1 (-9))
66 :Instant_class <- JAVA.class('java.time.Instant')
7+:Object_class <- JAVA.class('java.lang.Object')
78
89 :new <- {(:Unix_time)
910 :Second = Unix_time // 1
@@ -33,7 +34,10 @@
3334
3435 ... COMPARE.trait{(:C)
3536 C.lt_fun{(:X :Y)
36- X.unix_time < Y.unix_time
37+ X.Java_ins.call_method('compareTo' [Y.Java_ins]).to_kink_num < 0
38+ }
39+ C.eq_fun{(:X :Y)
40+ X.Java_ins.call_method('equals' [Y.Java_ins.as(Object_class)]).to_kink_bool
3741 }
3842 }
3943
Show on old repository browser