diff --git a/README.md b/README.md index b80365d..5be77d3 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,7 @@ a.humanize() // 'a few minutes' ##### Own rules / i18n If you want to pass a different humanize function you can. +The order of the array is important. The first match will return, like in a standard server router. The first argument is a function that takes the duration and returns a boolean. The second takes also matched duration and returns a string for the user. ###### Example @@ -140,4 +141,4 @@ a.subtract(1, 'day') a.humanize(humanizer) // '1 day' a.subtract(12, 'hours') a.humanize(humanizer) // 'catch all, below 1 day' -``` \ No newline at end of file +```