cal -y 1905
Про то, что у нас тогда Юлианский календарь был, помнишь?
Я это припоминаю, но объясни, как воспользоваться этим, чтобы вышло воскресенье. Надо же вычесть, а не прибавить 13 дней. Или всё-таки прибавить?
странно, что cal про это не знает
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.
Разница со временем накапливается.
13 января по новому стилю — это 1 января по старому. Кровавое воскресенье — это 9 января по старому, т.е. 22 по новому. Воскресенье.
web-страница
9(22) января 1905 около 30 тысяч человек (в основном, рабочих) по инициативе священника Гапона предприняли мирное шествие к Зимнему дворцу в Санкт-Петербурге, резиденции императора Николая II. Они требовали освобождения всех революционеров и террористов из тюрем, более человечные рабочие условия, передачу земли крестьянам, отмену цензуры и религиозную терпимость. Также демонстранты требовали создания парламента. Несмотря на то, что демонстрация протекала мирно и не являлась революционным актом (некоторые пришли с семьями и даже несли портреты царя Николай II (по другим данным комендант Санкт-Петербурга, поскольку царь с 8 января был в Царском Селе) отдал приказ стрелять в толпу.
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.
Похоже, ты прав.
Как обычно --- прочитать 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
---
"Аллах не ведёт людей неверных."
SYNOPSIS
cal [-smjy13] [[month] year]
$ 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
---
"Аллах не ведёт людей неверных."
на моей системе не выдаёт ничего
![](/images/graemlins/frown.gif)
$ 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: ОС - это БЗДя
$ 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: ОС - это БЗДя
А что значит A9:?
мог по локали догадаться.
Найдётся всё!
---
Q9: А почему Линукс не ОС?
A9: ОС - это БЗДя
![](/images/graemlins/smile.gif)
Оставить комментарий
sany79
Я удивился, узнав, что Кровавое воскресенье было в понедельник 9 января 1905 г. Что бы это значило? Можно ли верить программе cal?