You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Date.new(2018,6,6).week_of_month returns 2 because this date lies in second week of June.
We assume week starts from Sunday and ends at Saturday. 1st of June is on friday, and thus only 1 and 2 june lies in first week.
If you want to Monday to be starting day of week then set WeekOfMonth.configuration.monday_active = true in your code.
i have suggestion about function week_of_month and general_week_of_month.
for example, Jun. 2018, starts with friday(2018,6,1) and it is 5th week of May.
in this code, it shows incorrect week number.
there is solution to use 'general_week_of_month' but this function return incorrect value if
date is "2018,5,1"
i avoided this issue using below code
is there better solution?
The text was updated successfully, but these errors were encountered: