cal -y 1905

sany79


Января
Пн Вт Ср Чт Пт Сб Вс
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Я удивился, узнав, что Кровавое воскресенье было в понедельник 9 января 1905 г. Что бы это значило? Можно ли верить программе cal?

Helga87

Про то, что у нас тогда Юлианский календарь был, помнишь?

sany79

Я это припоминаю, но объясни, как воспользоваться этим, чтобы вышло воскресенье. Надо же вычесть, а не прибавить 13 дней. Или всё-таки прибавить?

yolki

странно, что cal про это не знает

sany79

Чего-то вообще крыша едет:
man cal:
The Gregorian Reformation is assumed to have occurred in 1752 on the 3rd of September. By this time, most countries had recognized the reformation (although a few did not recognize it until the early 1900's.) Ten days following that date were eliminated by the reformation, so the calendar for that month is a bit unusual.

Helga87

Разница со временем накапливается.

Helga87

13 января по новому стилю — это 1 января по старому. Кровавое воскресенье — это 9 января по старому, т.е. 22 по новому. Воскресенье.

Helga87

 web-страница
9(22) января 1905 около 30 тысяч человек (в основном, рабочих) по инициативе священника Гапона предприняли мирное шествие к Зимнему дворцу в Санкт-Петербурге, резиденции императора Николая II. Они требовали освобождения всех революционеров и террористов из тюрем, более человечные рабочие условия, передачу земли крестьянам, отмену цензуры и религиозную терпимость. Также демонстранты требовали создания парламента. Несмотря на то, что демонстрация протекала мирно и не являлась революционным актом (некоторые пришли с семьями и даже несли портреты царя Николай II (по другим данным комендант Санкт-Петербурга, поскольку царь с 8 января был в Царском Селе) отдал приказ стрелять в толпу.

sany79

Кажется, знает, но в России переход от одного календаря к другому был позже, чем в других странах.
The cal(1) date routines were written from scratch, basically from first
principles. The algorithm for calculating the day of week from any
Gregorian date was "reverse engineered". This was necessary as most of
the documented algorithms have to do with date calculations for other
calendars (e.g. julian) and are only accurate when converted to gregorian
within a narrow range of dates.

sany79

Похоже, ты прав.

Ivan8209

> объясни, как воспользоваться этим, чтобы вышло воскресенье
Как обычно --- прочитать man.

$ cal -R 1918/2/1 -yd1 2 1918
February 1918
M Tu W Th F S S
14 15 16 17
18 19 20 21 22 23 24
25 26 27 28


$ cal -R 1918/2/1 -yd1 1 1905
January 1905
M Tu W Th F S S
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

---
"Аллах не ведёт людей неверных."

sany79

У тебя какой-то навороченный кал. Маны я читаю, я люблю это дело. Но про -R там ни слова:
SYNOPSIS
cal [-smjy13] [[month] year]

Ivan8209

> Кажется, знает, но в России переход от одного календаря к другому был позже, чем в других странах.

$ man cal | col -b | sed -n '/^NOTES/,/^[A-Z]/p'
NOTES
In the USA and Great Britain the Gregorian Reformation occurred in 1752.
By this time, most countries had recognized the reformation (although a
few did not recognize it until the 1900's.) Eleven days following
September 2, 1752 were eliminated by the reformation, so the calendar for
that month is a bit unusual.

In view of the chaotic way the Gregorian calendar was adopted throughout
the world in the years between 1582 and 1928 make sure to take into
account the date of the Gregorian Reformation in your region if you are
checking a calendar for a very old date.

cal has a decent built-in list of Gregorian Reform dates and the names of
the countries where the reform was adopted:

Italy Oct. 5, 1582 Denmark Feb. 19, 1700
Spain Oct. 5, 1582 Great Britain Sep. 3, 1752
Portugal Oct. 5, 1582 Sweden Feb. 18, 1753
Poland Oct. 5, 1582 Finland Feb. 18, 1753
France Dec. 12, 1582 Japan Dec. 20, 1872
Luxembourg Dec. 22, 1582 China Nov. 7, 1911
Netherlands Dec. 22, 1582 Bulgaria Apr. 1, 1916
Bavaria Oct. 6, 1583 U.S.S.R. Feb. 1, 1918
Austria Jan. 7, 1584 Serbia Jan. 19, 1919
Switzerland Jan. 12, 1584 Romania Jan. 19, 1919
Hungary Oct. 22, 1587 Greece Mar. 10, 1924
Germany Feb. 19, 1700 Turkey Dec. 19, 1925
Norway Feb. 19, 1700 Egypt Sep. 18, 1928

The country known as Great Britain can also be referred to as England
since that has less letters and no spaces in it. This is meant only as a
measure of expediency, not as a possible slight to anyone involved.

HISTORY

---
"Аллах не ведёт людей неверных."

sany79

$ man cal | col -b | sed -n '/^NOTES/,/^[A-Z]/p'
на моей системе не выдаёт ничего

Ivan8209


$ man cal | col -b | head
CAL(1) NetBSD General Commands Manual CAL(1)

NAME
cal -- displays a calendar

SYNOPSIS
cal [-hjry3] [-A after] [-B before] [-d day-of-week] [-R reform-spec]
[[month] year]

DESCRIPTION

---
A9: ОС - это БЗДя

Ivan8209


$ ident `which cal`
/usr/bin/cal:
$NetBSD: crt0.c,v 1.13 2003/07/26 19:24:27 salo Exp $
$NetBSD: cal.c,v 1.18 2003/08/07 11:13:13 agc Exp $

---
A9: ОС - это БЗДя

sany79

А у меня кальный Линукс Mandriva 2006.
А что значит A9:?

yolki

мог по локали догадаться.

Ivan8209

"Яндекс."
Найдётся всё!
---
Q9: А почему Линукс не ОС?
A9: ОС - это БЗДя

sany79

Оставить комментарий
Имя или ник:
Комментарий: