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

8
LINES

< > BotCompany Repo | #1022878 // ai_clockTimeBot_howLongBetween

JavaX fragment (include)

// e.g. "How long is it from 18:30 to 10 pm?"
sS ai_clockTimeBot_howLongBetween(S s) {
  //if (!matchX("...how long...", s)) null;
  L<Int> clocktimes = map clockTimeMinutesFromFields(pAttractor_allMatches3(
    ll(new ClockTimeAttractor_AM_PM, new ClockTimeAttractor_colon),
    javaTok(s)));
  ret n2(second(clocktimes)-first(clocktimes), "minute");
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022878
Snippet name: ai_clockTimeBot_howLongBetween
Eternal ID of this version: #1022878/2
Text MD5: ca1a0a1491643397ddf3397443aedf2f
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-12 17:21:07
Source code size: 360 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 173 / 218
Version history: 1 change(s)
Referenced in: [show references]