Z
Z
zayko2012-09-17 08:45:58
ruby
zayko, 2012-09-17 08:45:58

What is the correct name for "Eastern" method for numbering the days of the week (from 1 to 7)?

In the English-speaking ("Western") understanding, the week begins on Sunday and ends on Saturday. And the numbering of their days is from 0 to 6. In our understanding (“Eastern”), the week goes from Monday to Sunday (from 1 to 7).
Ruby 's Date#cwday method returns the numbers 1 through 7 .
Question: Why is ruby's cwday method named that way? What are the approaches for numbering days from 0 to 1 and from 1 to 7 generally called?
I'm interested in this because I'm making a JS library, where I use numbering of days that is convenient for me from 1 to 7. The problem is how to correctly write a document in order to correctly convey the reasons for numbering to English-speaking users.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Zagrebelin, 2012-09-17
@Zagrebelion

If I were reading the library doc, the last thing I would be happy to see is " Commercial day of the week " or a link to 30 pages of the ISO standard, but something like " where 1-Moday, 7-Sunday " would be in just right. And why did the author do this - these are his problems, why should I know what kind of cockroaches he has in his head?

S
SadGnome, 2012-09-17
@SadGnome

From the documentation ( http://corelib.rubyonrails.org/classes/Date.html )
For instance, mon() gives the Civil month, cwday() gives the Commercial day of the week, and yday() gives the Ordinal day of the year.

Z
zayko, 2012-09-17
@zayko

OK. found it myself.
The way I count the days is consistent with the international standard ISO 8601
According to the Jewish and Christian calendars based on the Bible, Sunday was considered the first day of the week. It comes after Saturday, the seventh day of the week (Ex. 20:10) in the old religious calendars. Christianity borrowed the order of the days of the week from the Jewish calendar. In the Roman Empire, the first Christian Emperor Constantine introduced a seven-day week in 321 and designated Sunday (the day of the Sun) as the first day of the week and a day of rest and worship.
Today, in European countries, Sunday is considered the last day of the week. Sunday is the first day of the week in the USA, Israel, Canada, and some African countries. In the USSR, Sunday was considered the last day of the week. In some European languages ​​(in Slavic, German, Finnish, Icelandic) the name of the day of the week Wednesday indicates the fact that Wednesday was originally the 4th day of the week, and not the 3rd, as is currently the case in European countries. According to the ISO 8601 international standard, Monday is considered the first day of the week, and Sunday is the last.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question