wanasit / chrono

A natural language date parser in Javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding a new language

catalinux opened this issue · comments

Is there any guide for adding a new language?

My thinks is to the the following

  • copy folders en for tests and source for new language
  • changing tests and updatinng the code till tests will pass

Any other issues I might look into?

Hello @catalinux. Thanks for reaching out.

What you described is correct. Just follow the English example:
You can also look into previous new language PR (e.g. #519).

However, the only thing I would like to ask is please make small incremental CRs.

  • Don't try to support every pattern at once.
  • It's ok to start with a near-empty setup. Then, add a only few parsers (and tests) at a time.
  • Small CRs would be easier to test and review.