{"action":"created","issue":{"url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/96","labels_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/96/comments","events_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/96/events","html_url":"https://github.com/georgjaehnig/serchilo-drupal/issues/96","id":66613185,"number":96,"title":"New argument type: date","user":{"login":"georgjaehnig","id":1092628,"avatar_url":"https://avatars.githubusercontent.com/u/1092628?v=3","gravatar_id":"","url":"https://api.github.com/users/georgjaehnig","html_url":"https://github.com/georgjaehnig","followers_url":"https://api.github.com/users/georgjaehnig/followers","following_url":"https://api.github.com/users/georgjaehnig/following{/other_user}","gists_url":"https://api.github.com/users/georgjaehnig/gists{/gist_id}","starred_url":"https://api.github.com/users/georgjaehnig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgjaehnig/subscriptions","organizations_url":"https://api.github.com/users/georgjaehnig/orgs","repos_url":"https://api.github.com/users/georgjaehnig/repos","events_url":"https://api.github.com/users/georgjaehnig/events{/privacy}","received_events_url":"https://api.github.com/users/georgjaehnig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-06T14:04:54Z","updated_at":"2015-04-17T02:19:40Z","closed_at":null,"body":"As suggested in #94, arguments could be assigned to types which would trigger some parsing and rewriting of user input. One idea is a new argument type `date`.\r\n\r\nCurrently, when one wants to put the date of tomorrow into a query, one needs to think about its actual date. E.g. when querying for a train connection tomorrow at 11:00, I need to call\r\n`db berlin, hamburg, 11, 7.4.`\r\nInstead, something like\r\n`db berlin, hamburg, 11, +1`\r\nwould be convenient.\r\n\r\nTo achieve this, we could introduce arguments types, and one argument type could be `date`:\r\n`http://reiseauskunft.bahn.de/bin/query.exe/dn?S={%Start}&Z={%Ziel}&T={%Zeit}&D={%Datum|type=date|output=d.m.y}&start=1`\r\n\r\nWhen parsing this particular type, the user input could be processed by PHP's [strtotime](http://php.net/manual/de/function.strtotime.php). The obtained timestamp could then be given to PHP's [date](http://php.net/manual/de/function.date.php), along with the given `output`definition."},"comment":{"url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/comments/93879791","html_url":"https://github.com/georgjaehnig/serchilo-drupal/issues/96#issuecomment-93879791","issue_url":"https://api.github.com/repos/georgjaehnig/serchilo-drupal/issues/96","id":93879791,"user":{"login":"georgjaehnig","id":1092628,"avatar_url":"https://avatars.githubusercontent.com/u/1092628?v=3","gravatar_id":"","url":"https://api.github.com/users/georgjaehnig","html_url":"https://github.com/georgjaehnig","followers_url":"https://api.github.com/users/georgjaehnig/followers","following_url":"https://api.github.com/users/georgjaehnig/following{/other_user}","gists_url":"https://api.github.com/users/georgjaehnig/gists{/gist_id}","starred_url":"https://api.github.com/users/georgjaehnig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgjaehnig/subscriptions","organizations_url":"https://api.github.com/users/georgjaehnig/orgs","repos_url":"https://api.github.com/users/georgjaehnig/repos","events_url":"https://api.github.com/users/georgjaehnig/events{/privacy}","received_events_url":"https://api.github.com/users/georgjaehnig/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T02:19:40Z","updated_at":"2015-04-17T02:19:40Z","body":"First step: 2422d4a."}}