Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/seconds-to-duration' into f…
Browse files Browse the repository at this point in the history
…eat/seconds-to-duration
  • Loading branch information
peterpeterparker committed Nov 14, 2023
2 parents 11887be + 7208ec4 commit f2864cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ npm i @dfinity/agent @dfinity/candid @dfinity/principal
- [encodeBase32](#gear-encodebase32)
- [decodeBase32](#gear-decodebase32)
- [bigEndianCrc32](#gear-bigendiancrc32)
- [secondsToDuration](#gear-secondstoduration)
- [debounce](#gear-debounce)
- [isNullish](#gear-isnullish)
- [nonNullish](#gear-nonnullish)
Expand Down Expand Up @@ -234,6 +235,20 @@ Parameters:

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/crc.utils.ts#L61)

#### :gear: secondsToDuration

Convert seconds to a human-readable duration, such as "6 days, 10 hours."

| Function | Type |
| ------------------- | ----------------------------- |
| `secondsToDuration` | `(seconds: bigint) => string` |

Parameters:

- `seconds`: - The number of seconds to convert.

[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/date.utils.ts#L10)

#### :gear: debounce

| Function | Type |
Expand Down

0 comments on commit f2864cb

Please sign in to comment.