sclass GermanDateAdapter extends WordAdapter2 { static L<S> months = splitAtSpace("___ Januar Februar März April Mai Juni Juli August September Oktober November Dezember"); S lookupToken(S s) { int i = indexOf(months, s); if (i >= 0) pcall { S j = lookupToken(str(i)); //print("Month found! " + s + " => " + i + " => " + j); if (nempty(j)) ret months.get(parseInt(j)); } ret super.lookupToken(s); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1003510 | 
| Snippet name: | GermanDateAdapter | 
| Eternal ID of this version: | #1003510/1 | 
| Text MD5: | f2898ca427456a23017a3466c26b37e7 | 
| Author: | stefan | 
| Category: | javax / talking robots | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2016-07-10 14:50:59 | 
| Source code size: | 463 bytes / 14 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 866 / 1827 | 
| Referenced in: | [show references] |