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

14
LINES

< > BotCompany Repo | #1003510 // GermanDateAdapter

JavaX fragment (include)

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: 643 / 1593
Referenced in: #1003872 - Integrating #759 in One Program
#1003874 - Backup of #759 Before Integration
#1004091 - 759 with new loadClasses (spike)
#1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)