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

7
LINES

< > BotCompany Repo | #1028625 // parseHourAndOptionalMinutesToMinutes

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

Libraryless. Click here for Pure Java version (2553L/16K).

static Int parseHourAndOptionalMinutesToMinutes(S s) {
  LS l = trimAll(splitAtColon(s));
  if (empty(l)) null;
  int minute = parseInt(first(l))*60;
  if (l(l) > 1) minute += parseInt(second(l));
  ret minute;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028625
Snippet name: parseHourAndOptionalMinutesToMinutes
Eternal ID of this version: #1028625/2
Text MD5: 902dd58aff670ba04c0c18b46b0e6b9a
Transpilation MD5: 90e3265d1c1dd5b6c141183ee7814592
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-29 11:28:57
Source code size: 218 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 110 / 166
Version history: 1 change(s)
Referenced in: [show references]