Calendar
Calendar
Topic: CALENDAR
CSE-101
Date of Allotment:13-10-2010
Section: B4005
Acknowledgement
• I am grateful to Almighty for giving me the strength to successfully
conduct my term paper and for sustaining my efforts which many a
times did oscillate.
• Last but not the least I thank all My Friends and Batch Mates,
without their prompt support my efforts would have been in vain.
TRIBHUWAN JOSHI
INTRODUCTION OF CALENDAR
A calendar is a system of organizing days for social, religious, commercial, or
administrative purposes. This is done by giving names to periods of time,
typically days, weeks, months, and years. The name given to each day is known as
a date. Periods in a calendar (such as years and months) are usually, though not
necessarily, synchronized with the cycle of the sun or the moon. Many civilizations and
societies have devised a calendar, usually derived from other calendars on which they
model their systems, suited to their particular needs.
A calendar is also a physical device (often paper). This is the most common usage of
the word. Other similar types of calendars can include computerized systems, which
can be set to remind the user of upcoming events and appointments.
A calendar can also mean a list of planned events, such as a court calendar.
Calendar systems
A full calendar system has a different calendar date for every day. Thus the week cycle
is by itself not a full calendar system; neither is a system to name the days within
a year without a system for identifying the years.
The simplest calendar system just counts time periods from a reference date. This
applies for the Julian day. Virtually the only possible variation is using a different
reference date, in particular one less distant in the past to make the numbers smaller.
Computations in these systems are just a matter of addition and subtraction.
week
and weekday – this system (without year, the week
number keeps on increasing) is not very common
yearand ordinal date within the year, e.g. the ISO 8601
ordinal date system
Very commonly a calendar includes more than one type of cycle, or has both cyclic and
acyclic elements. A lunisolar calendar is synchronized both to the motion of the moon
and to the apparent motion of the sun; an example is the Hebrew calendar.
Many calendars incorporate simpler calendars as elements. For example, the rules of
the Hebrew calendar depend on the seven-day week cycle (a very simple calendar), so
the week is one of the cycles of the Hebrew calendar. It is also common to operate two
calendars simultaneously, usually providing unrelated cycles, and the result may also
be considered a more complex calendar. For example, the Gregorian calendar has no
inherent dependence on the seven-day week, but in Western society the two are used
together, and calendar tools indicate both the Gregorian date and the day of week.
The week cycle is shared by various calendar systems (although the significance of
special days such as Friday, Saturday, and Sunday varies). Systems of leap days
usually do not affect the week cycle. The week cycle was not even interrupted when 10,
11, 12, or 13 dates were skipped when the Julian calendar was replaced by the
Gregorian calendar by various countries.
Uses
The primary practical use of a calendar is to identify days: to be informed about and/or
to agree on a future event and to record an event that has happened. Days may be
significant for civil, religious or social reasons. For example, a calendar provides a way
to determine which days are religious or civil holidays, which days mark the beginning
and end of business accounting periods, and which days have legal significance, such
as the day taxes are due or a contract expires. Also a calendar may, by identifying a
day, provide other useful information about the day such as its season.
Calendars are also used to help people manage their personal schedules, time and
activities, particularly when individuals have numerous work, school, and family
commitments. People frequently use multiple systems, and may keep both
a business and family calendar to help prevent them from overcommitting their time.
Calendars are also used as part of a complete timekeeping system: date and time of
day together specify a moment in time. In the modern world, written calendars are no
longer an essential part of such systems, as the advent of accurate clocks has made it
possible to record time independently of astronomical events.
Currently used calendars
Calendars in widespread use today include the Gregorian calendar, which is the de
facto international standard, and is used almost everywhere in the world for civil
purposes, including in the People's Republic of China and India (along with the Indian
national calendar). Due to the Gregorian calendar's obvious connotations of Western
Christianity, non-Christians and even some Christians sometimes justify its use by
replacing the traditional era notations "AD" and "BC" ("Anno Domini" and "Before
Christ") with "CE" and "BCE" ("Common Era" and "Before Common Era"). The Hindu
calendars are some of the most ancient calendars of the world. Eastern Christians of
eastern Europe and western Asia used for a long time the Julian Calendar, that of the
old Orthodox church, in countries like Russia. For over 1500 years, Westerners used
the Julian Calendar also.
While the Gregorian calendar is widely used in Israel's business and day-to-day affairs,
the Hebrew calendar, used by Jews worldwide for religious and cultural affairs, also
influences civil matters in Israel (such as national holidays) and can be used there for
business dealings (such as for the dating of checks).
The Iranian (Persian) calendar is used in Iran and Afghanistan. The Islamic calendar is
used by most non-Iranian Muslims worldwide. The Chinese, Hebrew, Hindu,
and Julian calendars are widely used for religious and/or social purposes. The Ethiopian
calendar or Ethiopic calendar is the principal calendar used in Ethiopia and Eritrea.
In Thailand, where the Thai solar calendar is used, the months and days have adopted
the western standard, although the years are still based on the traditional Buddhist
calendar. Bahá'ís worldwide use the Bahá'í calendar.
Even where there is a commonly used calendar such as the Gregorian calendar,
alternate calendars may also be used, such as a fiscal calendar or the astronomical
year numbering system.
#include<conio.h>
int d;
d=31;
d=30;
d=29;
else
d=28;
return d;
void main()
clrscr();
textcolor(CYAN);
scanf("%4u",&y);
if(y<0)
y=-y;
scanf("%2u",&m);
if(m<=0 || m>=13)
m=1;
clrscr();
gotoxy(32,2);
cprintf("Calendar");
y1=0;
t=0;
while(y1<y)
t=t+366;
else
t=t+365;
y1++;
}
m1=1;
while(m1<m)
d=day(m1,y);
t=t+d;
m1++;
d=t%7;
printf("Year: '%u'",y);
printf("Month: '%s'",a[m-1]);
printf("%6s%6s%6s%6s%6s%6s%6s","Sun","Mon","Tue","Wed","Thu","Fri","Sat");
textcolor(GREEN);
k=1;
for(i=1;i<=day(m,y);i++,k++)
if(i==1)
if(d==0)
for(j=1;j<7;j++,k++)
printf("%6s","");
else
for(j=1;j<d;j++,k++)
printf("%6s","");
cprintf("%6d",i);
if(k%7==0)
printf(" ");
gotoxy(27,22);
cprintf("www");
getch();