Skip to content

replace dateformat with a faster implementation #610

@Uzlopak

Description

@Uzlopak

Regarding dateformat being esm and also in regards of older PRs like #235 or felixge/node-dateformat#169 :

I refactored dateformat and more importantly implemented a DateFormatter class.

You can see the result here: felixge/node-dateformat#187

I also tested my DateFormatter class against the dateformat test suite. It passes.

My implementation of DateFormatter is by a magnitude faster than dateformat. See the benchmarks in the PR against the dateformat repository.

We could integrate DateFormater into pino-pretty or create a @pino/date-formatter package.

I dont see any reason, why we should stick with the dateformat package.

@mcollina
@jsumners

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions