CallMeFoxie / Calendar

1 stars 2 forks source link

Suggestion: Separate Hour/Minute System #5

Open Abastro opened 8 years ago

Abastro commented 8 years ago

I think hour and minute is not necessarily part of calendar, and it is complicating ICalendarProvider. So what about making it separate, and let other provider deal with it?

CallMeFoxie commented 8 years ago

That would mean that a calendar would have to be able to talk to the datetime as the calendar has to be able to calculate the date. From ticks since the beginning. Which relate to seconds -> minutes -> hours -> days -> months -> years

Abastro commented 8 years ago

Sorry, I didnt understand what you mean on this part: 'seconds -> minutes -> ...'

CallMeFoxie commented 8 years ago

A day consists of ticks. Ticks create seconds, which create minutes, which create hours, which create days, months, years.

Abastro commented 8 years ago

So why hours and minutes(or seconds) are important?

CallMeFoxie commented 8 years ago

I have an opposite problem -- separating calendar to daytime calculations would bring yet another level of complexity.

Abastro commented 8 years ago

Im not talking about daytime calculation. This issue is related with hour/minute and year/month/day.

CallMeFoxie commented 8 years ago

That's the problem - you'd have to register the hour/minute/second calculator to the year/month/day logic. I still see no reason for doing so.

Abastro commented 8 years ago

Why should i register them?

CallMeFoxie commented 8 years ago

Because if I separate them, how would the ICalendarProvider know what IDayProvider to use?

Abastro commented 8 years ago

Why ICalendarProvider should know that? One can combine them to use the system.

CallMeFoxie commented 8 years ago

OK, the other way around -- the IDayProvider has to be able to change days

PitchBright commented 8 years ago

Correct me if I'm wrong, Abastro… but you want your mod to be able to control the YearLength (# of days)…

… and let the CAPI config (or other mods) set the Seconds/Minutes/Hours Length…

correct?

Abastro commented 8 years ago

What is dayprovider? I didnt say something like that, what i want is just separate hour and minute. And setting time should be operated by central system, not a provider.

Abastro commented 8 years ago

@Pitchbright yes, one difference is this: also i want to set day length.

CallMeFoxie commented 8 years ago

IDayProvider would be the separate hour/minute/seconds API.

CallMeFoxie commented 8 years ago

If you want to set day length then you need to control the hours, minutes and seconds anyway..?

Abastro commented 8 years ago

Why? Hour, minute and second length is totally unrelated with day length.