N
N
Nikolai Turnaviotov2012-08-10 22:03:24
Calendar
Nikolai Turnaviotov, 2012-08-10 22:03:24

How "matrices" are programmatically generated/created calendars?

In the light of viewing ready-made calendar templates for 2014, a question arose:

Where can I find out how calendar matrices are calculated, which are then beautifully hung on the wall.
That is, here are the very plates where the names of the days of the week go at the top or side, and the numbers of the weeks along the horizontal axis.

And are there ready-made algorithms?

It's just that there are a bunch of functions in all programming languages ​​regarding the calendar, time and dates.

Do not sit and write with your hands that in this cell of the matrix we have such and such a date of the month,

I have come up with an algorithm approximately like this - in a bunch of cycles we fill in the matrix of 1-7 days of the week, if we know the number of days in a month and what day we have shoots the first day of the year, whether we have the year we need as well.
But I think how to do this, for example in Excel, so that the finished plate can, for example, be inserted into the p / o I need

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
S1ashka, 2012-08-10
@S1ashka

earlier in old notebooks there was a plate for calculating the calendar for any year
en.wikipedia.org/wiki/%D0%92%D0%B5%D1%87%D0%BD%D1%8B%D0%B9_%D0%BA% D0%B0%D0%BB%D0%B5%D0%BD%D0%B4%D0%B0%D1%80%D1%8C read

L
Leonid, 2012-08-12
@leonid-lapidus

Maybe the topic and links in it will be useful to you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question