Skip to content

Get rid of calculations inside the date-io #280

@dmtrKovalenko

Description

@dmtrKovalenko

The main idea is to resolve #279 Treeshaking issue. Right now we fully depend on the date libraries for calculation of something. But maybe will be a better idea to provide an interface only for localization-related features (like formatting, parsing, getting day ranges)

Problem: no way to get some specific functionality outside of date-io quickly. Need to get a patch. Also if some consumer of date-io is not using one of the methods - they will not be treeshaked

Solution: Provide a method for converting value back to js date object like toJsDateObject and use date-fns functions for consumers. This will not generate a lot of bundlesize for end-users, because functions like this are really tiny. The most bloating part (formatting and parsing) we will not require anyway

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions