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.

static double parseHourMinSecOrMinSecAsSeconds_colons(S s) {
  LS l = splitAtColon(s);
  ret empty(l) ? Double.NaN : hourMinSecToSec(
    parseInt(nextToNextToLast(l)),
    parseInt(nextToLast(l)),
    parseInt(last(l)));
}

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: 104 / 160
Version history: 5 change(s)
Referenced in: [show references]