1 | sclass ClockTimeAttractor_AM_PM > PJFindAttractor { |
2 | int hour, minute; |
3 | |
4 | *() { |
5 | super("<int> *", |
6 | tokCondition { ret eqicGetOneOf(tok, i+3, "am", "pm"); }); |
7 | } |
8 | |
9 | public bool find() { |
10 | if (!super.find()) false; |
11 | hour = parseInt(get(tok(), 0)); |
12 | if (eqicGet(tok(), 2, "pm")) hour += 12; |
13 | minute = 0; |
14 | true; |
15 | } |
16 | } |
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: | #1022870 |
Snippet name: | ClockTimeAttractor_AM_PM |
Eternal ID of this version: | #1022870/11 |
Text MD5: | 505804801a0146048a1012bc78bc735e |
Author: | stefan |
Category: | javax / discord |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-04-12 17:01:06 |
Source code size: | 356 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 266 / 711 |
Version history: | 10 change(s) |
Referenced in: | [show references] |