We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could you put an option where the week should only start if you have a Wednesday?
The text was updated successfully, but these errors were encountered:
Something like that
def get_month_week(date_or_time, start_day = :monday) date = date_or_time.to_date month_start = Date.new(date.year, date.month, 1) week_start_format = start_day == :monday ? '%U' : '%W' week_of_month = date.week_of_month month_start_num = month_start.strftime(week_start_format).to_i month_start_num += 1 if month_start.wday > 4 # Skip first week if doesn't contain a Thursday month_week_index = date.strftime(week_start_format).to_i - month_start_num month_week_index end
Sorry, something went wrong.
No branches or pull requests
Could you put an option where the week should only start if you have a Wednesday?
The text was updated successfully, but these errors were encountered: