Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1019449 // howLongAgo_comparator

JavaX fragment (include)

static Comparator<S> howLongAgo_comparator() {
  ret makeComparator(func(S a, S b) -> int {
    long timeB = howLongAgo_toMS(b), timeA = howLongAgo_toMS(a);
    int result = cmp(timeB, timeA);
    ifdef howLongAgo_comparator_debug
      print("howLongAgo: " + a + " " + smallerGreaterEqualSign(-result) + " " + b);
    endifdef
    ret result;
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019449
Snippet name: howLongAgo_comparator
Eternal ID of this version: #1019449/4
Text MD5: 114aa7d77233c0a4e258e392e44ae9fe
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-07 01:28:18
Source code size: 360 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 391
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1019450 - howLongAgo_toMS