2 Day Developer > Working in a Global Environ... > Setting Up the Globalizatio... > Calendar Definitions
Calendar Definitions |
Previous |
Next |
This section contains the following topics:
The following calendar information is stored for each territory:
Some cultures consider Sunday to be the first day of the week. Others consider Monday to be the first day of the week.
The first day of the week is determined by the NLS_TERRITORY
parameter.
Some countries use week numbers for scheduling, planning, and bookkeeping. Oracle supports this convention. In the ISO standard, the week number can be different from the week number of the calendar year. For example, 1st
Jan
1988
is in ISO week number 53 of 1987. An ISO week starts on Monday and ends on Sunday.
To support the ISO standard, Oracle provides the IW date format element. It returns the ISO week number.
The first calendar week of the year is determined by the NLS_TERRITORY
parameter.
Oracle supports six calendar systems in addition to the Gregorian calendar, which is the default. The six calendar systems are:
Japanese Imperial—uses the same number of months and days as the Gregorian calendar, but the year starts with the beginning of each Imperial Era
ROC Official—uses the same number of months and days as the Gregorian calendar, but the year starts with the founding of the Republic of China
Persian—has 31 days for each of the first 6 months. The next 5 months have 30 days each. The last month has either 29 days or 30 days (leap year).
Thai Buddha—uses a Buddhist calendar
Arabic Hijrah—has 12 months with 354 or 355 days
English Hijrah—has 12 months with 354 or 355 days
The calendar system is specified by the NLS_CALENDAR
parameter.
The Islamic calendar starts from the year of the Hegira.
The Japanese Imperial calendar starts from the beginning of an Emperor's reign. For example, 1998 is the tenth year of the Heisei era.
Many different calendar systems are in use throughout the world. The NLS_CALENDAR
parameter specifies which calendar system Oracle Database XE uses. The default value is Gregorian
. The value can be any valid calendar format name.
The NLS_CALENDAR
parameter can have one of the following values:
Arabic Hijrah
English Hijrah
Gregorian
Japanese Imperial
Persian
ROC Official (Republic of China)
Thai Buddha
In Example: Setting NLS_CALENDAR='English Hijrah', the NLS_CALENDAR
parameter is set to English Hijrah.
Setting NLS_CALENDAR='English Hijrah'
-- set NLS_CALENDAR with ALTER SESSION ALTER SESSION SET NLS_CALENDAR='English Hijrah'; -- display the current system date SELECT SYSDATE FROM DUAL;
The output from the example should be similar to the following, depending on the current system date:
SYSDATE
--------------------
24 Ramadan 1422