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

7
LINES

< > BotCompany Repo | #1030447 // splitBusinessHoursAtMidnight

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2714L/17K).

// convert things like "18-8" to "18-24, 0-8"
static L<IntRange> splitBusinessHoursAtMidnight(L<IntRange> l) {
  ret concatLists(map(l, r ->
    r.end < r.start && r.start > 12
      ? ll(intRange(r.start, 24*60), intRange(0, r.end))
      : ll(r));
}

Author comment

Began life as a copy of #1028626

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030447
Snippet name: splitBusinessHoursAtMidnight
Eternal ID of this version: #1030447/1
Text MD5: 7104af910c1cd6d7423e305b38f2114e
Transpilation MD5: c24154443babbf9d3712079487b68ffd
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-17 20:36:28
Source code size: 257 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 184 / 246
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)