schedule-x icon indicating copy to clipboard operation
schedule-x copied to clipboard

Custom TimeUnits implementation

Open yringler opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.
I want a way to customize calendar, in order to use the calendar with the Jewish calendar*

*) In short, a lunar calendar, but with an extra month added in some years (according to a fixed system) to keep the months more or less in sync with the seasons of the year (AKA, the solar calendar)

Describe the solution you'd like
It looks like using a custom TimeUnits implementation would be enough; that should keep the months starting and ending according the Jewish month instead of the gregarorion, for example.

Could an option be added to CalendarConfig to specify the TimeUnits implementation? That should allow schedule-x to support any calendar system, without adding any complexity.

Additional context
Add any other context or screenshots about the feature request here.

Things that could speed up the process

  • [ ] I can picture implementing at least parts of this feature
  • [x] I believe I know how to do this, and am willing to implement the whole thing.

yringler avatar Sep 16 '24 21:09 yringler

I think you're perfectly right; being allowed to customize the TimeUnitsImpl seems like it would get the job done.

If you need to use any of the dependencies imported from the default implementation, as seen in the pic, feel free to expose them from the lib, so you don't have to re-create them later in your project

Bildschirmfoto 2024-09-17 um 07 56 22

tomosterlund avatar Sep 17 '24 06:09 tomosterlund