Skip to content

Commit

Permalink
Add proper text code highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
ndresx committed Jan 15, 2018
1 parent f6cd432 commit c8fdc9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ import Countdown, { zeroPad, getTimeDifference } from 'react-countdown-now';
```

### `zeroPad(value, [length = 2])`
The `zeroPad` function works similar to other well-known pad-functions and takes 2 arguments into account. A `value` which can be a `string` or `number`, as well as a `length` parameter which defaults to `2` as you are most likely only going to use this function if you actually want to pad one of your values. Either returns a number if `length` equals `0`, or the zero-padded string.
The `zeroPad` function works similar to other well-known pad-functions and takes 2 arguments into account. A `value` which can be a `string` or `number`, as well as a `length` parameter which defaults to `2` as you are most likely only going to use this function if you actually want to pad one of your values. Either returns a `number` if `length` equals `0`, or the zero-padded `string`.

### `getTimeDifference(date, [{ now = Date.now, precision = 0, controlled = false }])`
`getTimeDifference` calculates the time difference between a given end [`date`](#date) and the current date (`now`). It returns, similiar to the [`renderer`](#renderer) callback, a custom object which contains some time related data:
Expand Down

0 comments on commit c8fdc9b

Please sign in to comment.