Closed hirorongl closed 5 years ago
Could you explain what issue you encountered? Unfortunately your description doesn't explain the issue, so it is difficult to assess it.
I want to judge that only Sunday is a holiday and I want to judge that Saturday is weekday
I would like protected weekend_days to be set later when creating a sales calendar that will open only on Tuesdays and holidays as holidays
Ah, understand it better now. Indeed, that is currently not implemented well. I am thinking of adding a feature where Yasumi already includes the settings for weekends for each country.
That's good. In that case please implement so that it can be changed later by set. I am looking forward to the implementation
I've made changes to the weekend definitions that will now include also countries that have weekends that differ from the common global standard (Saturday + Sunday).
After re-reading your request, I'm not sure whether overriding the weekend variable is the correct path. The current weekend definition is what each country officially considers to be the weekend.
I believe your request is a bit different in the sense that what you consider 'holidays' (or in your case: shop open days). An alternative is to extend and create your own Holiday Provider that incorporates your business rules.
Let me know if your use case is different :)
Cheers! Sacha
It was definitely a request away from the definition of an official holiday.
The request is close to the regular holiday (Teikyuubi) mentioned in Japan.
It would be helpful if you let me know a sample of how to create a Holiday Provider that corresponds to a regular holiday (Teikyuubi) in Cookbook or Document
Sure! I think I will create a recipe for this in the Cookbook. There was somebody else last year with similar question, so a recipe would make sense :)
@hirorongl You can find an example on how to extend an existing HolidayProvider here: http://azuyalabs.github.io/yasumi/cookbook/custom_provider/
set weekend_days = [0];