Get date of first day of 'Week/Year' format in Ruby. where week starts from Saturday

26 views Asked by At

Is there an in build function to extract the date of the first day from "week/year" format in rails where weeks start on Saturday.

example: "01/2020" should give Sat, 04 Jan 2020

We can get the same for the weeks that starts with Monday.

Date.strptime("01/2020", "%V/%G") gives Mon, 30 Dec 2019

0

There are 0 answers