Deleted Added
full compact
calendar.3 (119893) calendar.3 (131504)
1.\" Copyright (c) 1997 Wolfgang Helbig
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
1.\" Copyright (c) 1997 Wolfgang Helbig
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD: head/lib/libcalendar/calendar.3 119893 2003-09-08 19:57:22Z ru $
25.\" $FreeBSD: head/lib/libcalendar/calendar.3 131504 2004-07-02 23:52:20Z ru $
26.\"
27.Dd November 29, 1997
28.Dt CALENDAR 3
29.Os
30.Sh NAME
31.Nm easterg ,
32.Nm easterog ,
33.Nm easteroj ,

--- 23 unchanged lines hidden (view full) ---

57.Ft int
58.Fn ndaysj "struct date *dt"
59.Ft int
60.Fn week "int nd" "int *year"
61.Ft int
62.Fn weekday "int nd"
63.Sh DESCRIPTION
64These functions provide calendar arithmetic for a large range of years,
26.\"
27.Dd November 29, 1997
28.Dt CALENDAR 3
29.Os
30.Sh NAME
31.Nm easterg ,
32.Nm easterog ,
33.Nm easteroj ,

--- 23 unchanged lines hidden (view full) ---

57.Ft int
58.Fn ndaysj "struct date *dt"
59.Ft int
60.Fn week "int nd" "int *year"
61.Ft int
62.Fn weekday "int nd"
63.Sh DESCRIPTION
64These functions provide calendar arithmetic for a large range of years,
65starting at March 1st, year zero (i. e. 1 B.C.) and ending way beyond
65starting at March 1st, year zero (i.e., 1 B.C.) and ending way beyond
66year 100000.
67.Pp
68Programs should be linked with
69.Fl lcalendar .
70.Pp
71The functions
72.Fn easterg ,
73.Fn easterog

--- 24 unchanged lines hidden (view full) ---

98.Fn ndaysg
99and
100.Fn ndaysj
101provide conversions between the common "year, month, day" notation
102of a date and the "number of days" representation, which is better suited
103for calculations.
104The days are numbered from March 1st year 1 B.C., starting
105with zero, so the number of a day gives the number of days since March 1st,
66year 100000.
67.Pp
68Programs should be linked with
69.Fl lcalendar .
70.Pp
71The functions
72.Fn easterg ,
73.Fn easterog

--- 24 unchanged lines hidden (view full) ---

98.Fn ndaysg
99and
100.Fn ndaysj
101provide conversions between the common "year, month, day" notation
102of a date and the "number of days" representation, which is better suited
103for calculations.
104The days are numbered from March 1st year 1 B.C., starting
105with zero, so the number of a day gives the number of days since March 1st,
106year 1 B.C. The conversions work for nonnegative day numbers only.
106year 1 B.C.
107The conversions work for nonnegative day numbers only.
107.Pp
108The
109.Fn gdate
110and
111.Fn jdate
112functions
113store the date corresponding to the day number
114.Fa nd

--- 31 unchanged lines hidden (view full) ---

146and the year 2000 is
147a leap year.
148The new rules were inaugurated on October 4, 1582 by deleting ten
149days following this date.
150Most catholic countries adopted the new
151calendar by the end of the 16th century, whereas others stayed with
152the Julian Calendar until the 20th century.
153The United Kingdom and
108.Pp
109The
110.Fn gdate
111and
112.Fn jdate
113functions
114store the date corresponding to the day number
115.Fa nd

--- 31 unchanged lines hidden (view full) ---

147and the year 2000 is
148a leap year.
149The new rules were inaugurated on October 4, 1582 by deleting ten
150days following this date.
151Most catholic countries adopted the new
152calendar by the end of the 16th century, whereas others stayed with
153the Julian Calendar until the 20th century.
154The United Kingdom and
154their colonies switched on September 2, 1752. They already had to
155their colonies switched on September 2, 1752.
156They already had to
155delete 11 days.
156.Pp
157The function
158.Fn week
159returns the number of the week which contains the day numbered
160.Fa nd .
161The argument
162.Fa *year
163is set with the year that contains (the greater part of) the week.
164The weeks are numbered per year starting with week 1, which is the
165first week in a year that includes more than three days of the year.
166Weeks start on Monday.
167This function is defined for Gregorian Calendar only.
168.Pp
169The function
170.Fn weekday
157delete 11 days.
158.Pp
159The function
160.Fn week
161returns the number of the week which contains the day numbered
162.Fa nd .
163The argument
164.Fa *year
165is set with the year that contains (the greater part of) the week.
166The weeks are numbered per year starting with week 1, which is the
167first week in a year that includes more than three days of the year.
168Weeks start on Monday.
169This function is defined for Gregorian Calendar only.
170.Pp
171The function
172.Fn weekday
171returns the weekday (Mo = 0 .. Su = 6) of the day numbered
173returns the weekday (Mo = 0 ..\& Su = 6) of the day numbered
172.Fa nd .
173.Pp
174The structure
175.Fa date
176is defined in
177.In calendar.h .
178It contains these fields:
179.Bd -literal -offset indent

--- 22 unchanged lines hidden ---
174.Fa nd .
175.Pp
176The structure
177.Fa date
178is defined in
179.In calendar.h .
180It contains these fields:
181.Bd -literal -offset indent

--- 22 unchanged lines hidden ---