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

7
LINES

< > BotCompany Repo | #1030369 // parseHourMinSecOrMinSecAsSeconds_colons - parses "hh:mm:ss" or "mm:ss" (or "ss")

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

Transpiled version (2592L) is out of date.

1  
static double parseHourMinSecOrMinSecAsSeconds_colons(S s) {
2  
  LS l = splitAtColon(s);
3  
  ret empty(l) ? Double.NaN : hourMinSecToSec(
4  
    parseInt(nextToNextToLast(l)),
5  
    parseInt(nextToLast(l)),
6  
    parseInt(last(l)));
7  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1030369
Snippet name: parseHourMinSecOrMinSecAsSeconds_colons - parses "hh:mm:ss" or "mm:ss" (or "ss")
Eternal ID of this version: #1030369/6
Text MD5: 83fb1ace26da819af0bcb8f56f39efd2
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-09 22:18:12
Source code size: 229 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 214 / 313
Version history: 5 change(s)
Referenced in: [show references]