extract the start of the line separately

* static/js/index.js: let's not try to match against the prefix more
  than once
also handle JavaScripts native date formats

* static/js/index.js: try to use the browser's parser before parsing
  manually
be less restrictive when applying regular expressions

* static/js/index.js: accept dates which do not start directly at the
  beginning of the input string
fix a typo

* static/js/index.js: fix “ReferenceError: padline is not defined”
Merge pull request #3 from herzi/master

Support more date formats