Skip to content
New issue

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

feat: support different calendars #14

Closed
wants to merge 2 commits into from

Conversation

JonasWanke
Copy link
Owner

Closes: #13

Checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

@JonasWanke JonasWanke added T: Feature Type: :tada: New Features C: Timetable Component: The actual timetable package labels Jun 10, 2020
@JonasWanke JonasWanke self-assigned this Jun 10, 2020
@JonasWanke
Copy link
Owner Author

@Jamalianpour Using the persian calendar (or any other calendar) is now supported. As I don't know much about it though, there might still be bugs or unsuitable behavior — please let me know if you find any!

To use the persian calendar, specify it when constructing your TimetableController:

myController = TimetableController(
  calendar: CalendarSystem.persianSimple,
  // ...
);

All dates you pass to timetable must also use this calendar (most notably start and end of an Event and the initialDate property of TimetableController).

I discovered a bug in time_machine while developing this feature, so I'll wait for a fix (Dana-Ferguson/time_machine#35) to be released before publishing this to pub. You can still try this feature today by specifying the following in your pubspec.yaml:

dependencies:
  time_machine:
    git:
      url: https://github.com/JonasWanke/timetable.git
      ref: issue/13-support-different-calendars

@unicorn-bot unicorn-bot added the C: Example Component: Example app label Jun 10, 2020
@unicorn-bot
Copy link

✔️ Unicorn Report

ℹ️ 1 Info

Generated by 🦄 Unicorn
Report an issue

@jwbot
Copy link
Collaborator

jwbot commented Jun 10, 2020

Flutter Analyze found 0 issues ✅

Generated by 🚫 Danger

@Ahmadre
Copy link

Ahmadre commented Mar 16, 2021

@JonasWanke do you need help in maintaining this project?

@JonasWanke
Copy link
Owner Author

I'm currently working on the major refactor tracked in #17, but after that, I'd appreciate contributions!

Regarding this PR: Due to dropping the dependency on time_machine, support for different calendars probably won't come soon. See #17 (comment) for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Example Component: Example app C: Timetable Component: The actual timetable package T: Feature Type: :tada: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support different calendars
4 participants