static S shortenEndTime(S endTime, S startTime) { int i = endTime.lastIndexOf(' ')+1; if (i > 0 && eq(substring(startTime, 0, i), substring(endTime, 0, i))) ret trim(substring(endTime, i)); ret endTime; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010039 |
Snippet name: | shortenEndTime - drop date if it's the same as start time |
Eternal ID of this version: | #1010039/1 |
Text MD5: | cbfb56c8064750521ad42a822de0c87e |
Author: | stefan |
Category: | javax / calendar |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-08-30 19:02:41 |
Source code size: | 219 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 509 / 564 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |