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)

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

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: 179 / 225
Version history: 1 change(s)
Referenced in: [show references]