Skip to content

Commit

Permalink
Merge branch 'master' into Humanizer-819
Browse files Browse the repository at this point in the history
  • Loading branch information
lucianogaube authored Jun 4, 2019
2 parents df913c2 + 65ed642 commit 86f5628
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ There isn't a `Dehumanize` method to turn a string representation back into a `B
Like other `TryParse` methods, `ByteSize.TryParse` returns `boolean` value indicating whether or not the parsing was successful.
If the value is parsed it is output to the `out` parameter supplied:

```
```C#
ByteSize output;
ByteSize.TryParse("1.5mb", out output);

Expand Down Expand Up @@ -1035,7 +1035,7 @@ Finally, if you need to calculate the rate at which a quantity of bytes has been

The `Per` method returns a `ByteRate` class which has a `Humanize` method. By default, rates are given in seconds (eg, MB/s). However, if desired, a TimeUnit may be passed to `Humanize` for an alternate interval. Valid intervals are `TimeUnit.Second`, `TimeUnit.Minute`, and `TimeUnit.Hour`. Examples of each interval and example byte rate usage is below.

```
```C#
var size = ByteSize.FromMegabytes(10);
var measurementInterval = TimeSpan.FromSeconds(1);

Expand All @@ -1051,7 +1051,7 @@ text = size.Per(measurementInterval).Humanize(TimeUnit.Hour);

You can specify a format for the bytes part of the humanized output:

```
```C#
19854651984.Bytes().Per(1.Seconds()).Humanize("#.##");
// 18.49 GB/s
```
Expand Down Expand Up @@ -1256,4 +1256,4 @@ Humanizer.jvm meets all your jvm needs for manipulating and displaying strings,
Humanizer is released under the MIT License. See the [bundled LICENSE](https://github.com/Humanizr/Humanizer/blob/master/LICENSE) file for details.

## <a id="icon">Icon</a>
Icon created by [Tyrone Rieschiek](https://twitter.com/Inkventive)
Icon created by [Tyrone Rieschiek](https://twitter.com/Inkventive)

0 comments on commit 86f5628

Please sign in to comment.