Skip to content

Commit 26677d8

Browse files
Updated readme
1 parent ff0be93 commit 26677d8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ console.log(timelydiff(timestamp2)); // "4 months ago"
3535

3636
> To generate a timestamp at the current moment and store it for later use, you can use the built-in JavaScript function Date.now(), which returns the number of milliseconds since January 1, 1970, 00:00:00 UTC (Unix timestamp).
3737
38-
38+
<br>
3939
Optionally, you can pass a second parameter to the function to specify the length of the output string. By default, the function will return a string in the format of x [unit] ago/in [x] [unit], but you can choose to return a shorter string by setting the length parameter to "short" or "shorter".
4040

4141
```javascript
@@ -46,7 +46,7 @@ console.log(timeDiffShort); // "4mo ago"
4646
//timelydiff(timestamp, "shorter") -> 4mo
4747
```
4848

49-
49+
<br>
5050
### API
5151
**`timelydiff(timestamp, length)`**
5252
Converts a Unix timestamp into a human-readable time difference.
@@ -59,11 +59,9 @@ Returns
5959
A string representing the time difference between the current time and the given timestamp.
6060

6161
<br>
62-
6362
### Contribution
6463
Contributions are welcome and appreciated! If you have an idea for an improvement or a bug fix, please feel free to open an issue or submit a pull request. Before submitting a pull request, please ensure that your code follows the existing code style and has been thoroughly tested. Thank you for helping to make TimelyDiff even better!
6564

6665
<br>
67-
6866
### License
6967
TimelyDiff is released under the **[MIT License](https://opensource.org/license/mit/)**.

0 commit comments

Comments
 (0)