Skip to content

Commit

Permalink
Add build size info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
kossnocorp committed Sep 13, 2024
1 parent 9bf2a4d commit cc88101
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The package provides `Date` extensions `UTCDate` and `UTCDateMini` that perform

Using it makes [date-fns] operate in UTC but can be also used without it.

Like everything else in the date-fns ecosystem, the library is build-size aware. The smallest component, `UTCDateMini,` is only `239 B`.

**Need more than just UTC?** See [@date-fns/tz](https://github.com/date-fns/tz) that provides full time zone support.

## Installation
Expand Down Expand Up @@ -36,6 +38,8 @@ addHours(utcDate, 2).toString();

### Difference between `UTCDate` and `UTCDateMini`

The main difference between `UTCDate` and `UTCDateMini` is the build footprint. The `UTCDateMini` is `239 B`, and the `UTCDate` is `504 B`. While the difference is slight, and `504 B` is not significant by any means, it might be essential in some environments and use cases.

Unlike `UTCDateMini` which implements only getters, setters, and `getTimezoneOffset`, `UTCDate` also provides formatter functions, mirroring all original `Date` functionality:

```ts
Expand Down

0 comments on commit cc88101

Please sign in to comment.