Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

How do you calculate a date from a week number? #15

Description

@vasco3
let date = Js.Date.fromString("2021-01-05")

date->ReDate.getWeek // returns 1

do you know how can I convert that "2021-W1" back to a date?

I would like to be able to get the start of that week.

something like

ReDate.getDateFromWeekNumber(~year=2021., ~weekNumber=1., ~weekStartsOn=Friday) 
// would return "2021-01-01T06:00:00.000Z"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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