Skip to content

Commit e4163e9

Browse files
author
Vadim Platonov
committed
instant: remove two argument constructor
1 parent 8fffdee commit e4163e9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/java_time/temporal.clj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,6 @@
344344
(fn [^Number m]
345345
(Instant/ofEpochMilli (long m))))
346346

347-
(conversion! [Number Number] Instant
348-
(fn [^Number s, ^Number m]
349-
(Instant/ofEpochSecond (long s) (long m))))
350-
351347
(conversion! [DateTimeFormatter CharSequence] Instant
352348
#(Instant/from (jt.f/parse %1 %2)))
353349

@@ -362,8 +358,7 @@
362358
+ string representation
363359
+ millis from epoch
364360
* two arguments
365-
+ formatter (format) and a string
366-
+ seconds from epoch and a nano adjustment"
361+
+ formatter (format) and a string"
367362
:returns Instant
368363
:implicit-arities [1 2]
369364
([] (jt.clock/make #(Instant/now %))))

test/java_time_test.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@
283283
(testing "instant"
284284
(is (= (j/instant clock)
285285
(j/instant "2015-11-26T10:20:30.000000040Z")
286-
(j/instant "yyyy/MM/dd'T'HH:mm:ss-SSSSSSSSS'['X']'" "2015/11/26T10:20:30-000000040[Z]")
287-
(j/instant 1448533230 40)))
286+
(j/instant "yyyy/MM/dd'T'HH:mm:ss-SSSSSSSSS'['X']'" "2015/11/26T10:20:30-000000040[Z]")))
288287

289288
(is (= (j/truncate-to (j/instant clock) :millis)
290289
;; (.toEpochMilli instant)

0 commit comments

Comments
 (0)