klimeryk / recalendar

ReCalendar - highly customizable calendar for ReMarkable tablets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Start the year at a predefined month

DutchJoe opened this issue · comments

Many years do not start in January.
For college years start in August or September.

I'd would love a configuration option where I can set the first month of the year.

John

Thanks for the suggestion! Interesting use case, I haven't thought of it! It should be easy to implement, I think 🤔 Just to be clear: let's say you define that the year starts in August 2021. Then the end of the "year" should be on August 2022? Or December 2021? Or maybe also configurable? ;)

I think it would be fair to say that a "year" always consists of 12 months. Otherwise you will run into all sorts of formatting issues (how would request #2 look like if a year could take 18 months?).

With that said, only a configuration option for the first month would be sufficient.
Eg if first month = August 2021, then the calendar would include August 2021 - July 2022.

John

Otherwise you will run into all sorts of formatting issues (how would request #2 look like if a year could take 18 months?).

Yup, that was my concern as well. It could be overcome with generating a year overview for each "calendar" year.. but that would probably complicate the logic.

But if it's always 12 months, that's simple to implement - I've done it in 7dfecd8 :) 🙌

You can now use the self::MONTH config parameter to set the start month. It's the month number - so for October, you'd use 10, etc. See

recalendar/config.php

Lines 71 to 75 in 7dfecd8

// The month from which to start the "year"
// Useful if you want to track your college year, for example.
// You could then set this to 10 (October) and the calendar
// would then be generated for 12 months starting from October.
self::MONTH => 1,

Hope this helps!

Perfect !
Thank you for your quick turnaround time.

John