Four major ways have been used to identify years in Japan. One is by reign years, a system used in early history; another is counting from the beginning of a year period, or era, (the nengô 年号system), which is still the official dating system; the third, now used only marginally in Japan, follows the Chinese 60-year cycle (kanshi 干支 system); and the fourth is the Western, or Christian, calendar. 
The earliest year dates used in China were the reign year of the ruler. These appear on some of the 13th-century BC bone oracles and early bronze vessels. However, in the 2nd-century BC these were replaced by era names (nengô, see below), and the sexagenary cycle cycle also started to be used for years around this time. Therefore, reign years were never used for records in Japan, though the system was known from Chinese histories like the classic Spring and Autumn Annals (covering 722 to 481 BC).
However, the editors of the Nihon Shoki for their year dates calculated the reign years of the Japanese emperors, except for the few years for which nengô existed. Thus we have dates like "in the 5th year and the 11th month of the reign of the Emperor Hatsuse-be." . The standard historians' dates follow the Shoki, using the later standard names for the emperors, so the above date is known as "Sushun 5."
In China, the "first year" of a reign was sometimes reckoned as the year a reign actually started and sometimes as the following year. However, perhaps influenced by the Spring and Autumn Annals, in the Shoki, reign years, including the first year (gannen 元年), started on New Year's Day and were not retroactive, so Year 1 usually starts on the New Year following the actual start of the reign. However there are some exceptions, notably Tenji 1 (662), which is the year after the death of Empress Seimei, though Tenji did not formally become emperor until 668.
Era (Nengô 年号) System
In the year-period system, which is still the official year-dating system in Japan, the imperial court determines that the era name (nengô 年号) shall be changed to XX, a two-character name using Chinese (on) readings such as Tai-ka 大化 or Hei-sei 平成. (From 749-770 four-character names were used.) The beginnings of eras are given in reference books; there is also a list in the article on Japanese Eras. This change in name can occur at any time of year.
In China, the first year period, Jian-yuan (Kengen) 建元, started in 140 A.D. In Japan, the first was Taika 大化 in 645 A.D., and the first period change was occasioned in 650 by the court's receiving the gift of a white pheasant: the period name was changed to Hakuchi 白雉.  After this, there were several decades when the names were not settled and the reign-year system was also used, but since 701 (Taihô), the eras have been reasonably established.
In the period from 1336-1392 there were two rival courts. Since the court determines the year periods, there were two sets of era names during this time. In 1910 it was officially decided that, the "southern" court had been the legitimate court during the period, so the "southern" era names are the official ones given in lists. However, as the "northern" era names were the ones actually used in most of the country, they are normally given somewhere in the lists, often marked as "northern dynasty."
Start of an Era
The start of a new era could be declared for any number of reasons. Among them were the occurrence of the first or 58th year of the 60-year cycle (see below), a new emperor (usually sometime during the year after the death of the previous emperor), natural disasters, etc. Many periods were only three or four years long. For most of history, the names had nothing to do with that of the emperor; though there was a Tenshô period, there was no "Emperor Tenshô." Furthermore, a change of emperor did not necessarily mean a new period. However, since the start of the Meiji period (1868), the only reason for a new period has been the reign of a new emperor, and the emperor is after death referred to by the name of the period he reigned in, so now we refer to the emperors Meiji, Taishô, and Shôwa. However, unlike the ancient reign-year system, the new era starts on the day of the death of the previous emperor (Taishô period, Shôwa period), or on the day after (Heisei period), not from the next year.
As mentioned above, a change in the era name can occur at any time of year. For instance, the Tenshô Era began the 28th day of the Seventh Month of 1573 and lasted until the 8th day of the Twelfth Month of 1592. New periods began during the day. However, the present period, Heisei 平成, began at exactly at midnight the morning of January 8, 1989. The exact day an era begins was not considered important until recently, however. At times, as in the Edo period, eras were treated as having started at the beginning of the year retroactively. Furthermore, as one never knows when a new period will begin, one often finds dates that officially did not exist. For example, there is a grave in western Tokyo (formerly Musashi province ) dated "Shitoku 4 (1387), 11th month," though Shitoku had ended in the 8th month. (Note that this is a "northern" nengô.) In modern times, drivers licenses valid to "Shôwa 66" remained valid to 1991, though Shôwa ended in 1989.
Calculating Year Periods
The first year of an era is called "gan-nen" 元年. Subsequent years are counted from the beginning of the calendar year. For example, the Shôwa period started December 25, 1926, and the second year of Shôwa 昭和二年 started one week later on January 1, 1927. When calculating between year periods and the Western year, remember that the first year of the era is 1, not 0. So, to calculate the dates of Shôwa, which began in 1926, add or subtract 1925 (=1926-1). Thus 1945 was 1945-1925 = Shôwa 20, while Shôwa 34 was 1925+34 = 1959. For a list of eras and the years they began, see the article on Japanese Eras.
Dating using nengô is very settled in Japan, so there is no confusion about interpreting them in Japanese.
Cyclic, or Kanshi 干支, system
Japan early took over the Sexegenary cycle (kanshi 干支) system from China. Japan and China use completely different nengô, but 1504 was the year of 甲子 throughout east Asia. In this system, two series of characters, the ten stems (kan 干) and the twelve branches (shi 支 ) are used cyclically. They can be combined into a series of sixty elements (see the article on the cycle), which may be used to indicate years. 甲子, the first element of the series, can indicate the years 904, 964, 1024, 1084, 1144, 1204, and all other years separated from these by a multiple of 60. 乙巳, the 42nd element in the series, can be 886, 946, 1006, 1066, 1126, 1186, 1246, etc. It is also common to indicate a year using only the branch, or shi, part of the cycle. Thus 巳 occurs every twelve years, as 886, 898, 910, etc. As the branches have gotten animal names attached to them, the years expressed by branches are often translated using animal names. A 巳 year is a "Year of the Snake," for example. Note, however, that since the cyclic terms repeat, one needs some more information than just the cyclic name to completely identify the year.
The cycles do have the advantage over the era system of being predictable. There is an Ôei 25 (1418) contract selling "the ten harvests of the ten years from the inu year to the following hitsuji year." While at the time the contract was written there was no way of knowing whether or not there would be a Ôei 34, there was bound to be a hitsuji year.
When used as part of date, Japanese readings are used for the characters; however, when the year becomes part of a proper name, the Chinese readings are usually used. Thus 戊辰 as part of a date is read "tsuchinoe-tatsu", while it is read as "Boshin" in the Boshin (1868) War 戊辰戦争. Similarly 己酉約条 is the Kiyû (1609) Agreement [between Korea and Japan] , and 甲子園 is Kôshi-en (1924) Ballpark, where all high-school baseball players dream of playing.
Use of cyclic dates seems to have virtually died out in the Meiji period (1868-1912). Most Japanese can recite the kan and shi in order. They generally know the branch (shi) of the current year and the year that they and family members were born in, but most do not know the branch for any other events, and they have no idea what the stem (kan) of any year is. Almanac-type calendars do have the cyclic year on them, but otherwise, the only documents I have seen dated using the cyclic year are New Years cards, and then normally only the shi.
Calculating Cyclic Dates
Most modern books will translate a date expressed in the cycles into either nengô years or Western years or both, but here is how to determine a date if necessary.
First you have to make a guess (G) or estimate as to the year. This is necessary because the cycles repeat every 60 years. You can look up the kanshi in the table at the end of the article on the Sexegenary cycle and add or subtract multiples of 60 of the "sample year" till you get near your year. Another way is this: Divide your guess (G) by 60 and throw away the remainder to get the quotient (Q). Calculate the position (P) of the kan-shi pair in the 60 cycle or get it from the table chart. The year is P+3+(60*Q). However, you may have to add or subtract 60 years (one cycle). For example, assume we have a letter dated 甲寅 written by someone who died in 1580. Let's take the guess G as 1570. 1570/60=26, so Q = 26. 甲寅 is 50th on the chart, so P=50. So 50+3+(60*26)= 1613, so 1613 was a 甲寅 year. But as the writer was already dead then, we subtract 60 to get 1653.
If a letter is dated using just the branch, use 12 instead of 60. Thus a letter from around 1610, dated 巳ノ三月十七日 , was written in 6+3+(12*134)= 1617, or maybe 1605.
Combined and Non-combined Era and Cyclic Years
The era dates and the cyclic dates were often combined. In fact, a date like 慶長十三年戊申 (Keichô 13 tsuchinoe-saru) could be written as
- or 慶長戊申.
(Note that the 年 ("year") was sometimes omitted, and sometime around the end of the 17th century it started being put after the kanshi, as 元禄三庚午年 or 元禄三午年 (1690)). All these forms but the last (慶長戊申) were very common in dating documents. The earliest example I know of the 慶長十三(年)申 form is 1608 (If anyone has some pre-Edo examples, I would like to know), but it seems to have become the standard bureaucratic way of writing dates, at least for the bakufu and Kishû han, though 申 only was not rare for a memorandum. The Edo-period graves I have seen in western Tokyo use the 元禄三午年 form. Of course, most letters were written without any year date at all.
In most cases where I saw the original document or a copy, the cyclic date was not written in line with the nengô part of the date. The two characters were often written horizontally under it, to each side of it, on a separate line, jutting out slightly from the line, etc.
Christians in 16th-17th century Japan knew the Christian dates. The printed translation of the Contemptus Mundi (Kontemutsusu Munji) is dated both "慶長十五年四月中旬" (Keichô 15, middle of the 4th Month) and 御救世以来千六百十年 (1610 Years since the Salvation of the World). However, during the Edo period when Christianity was forbidden, such dates were not used.
Since the Meiji period the western years have been used, especially for dates outside Japan. At the present, centuries and decades are stated in the western years. Even for Japanese dates, pre-Meiji dates are usually given in western years, or at least glossed the first time each nengô is mentioned. The nengô system is still the official one, however, and most people remember dates in their own personal history using nengô.
Everyone, however, knows what the current year is in both systems, and especially since the end of Shôwa many orgainizations (such as the Asahi Shinbun [Newspaper]) have switched over to western dates completely. Both systems are very common on printed shop bills and receipts.
When writing the current date, whether to use the era name or the Western year (AD) can depend on any one of a number of factors such as, organizational policy; attitude towards the emperor system; whatever strikes one at the moment (I have a eleven receipts from the same shop with hand-written dates, seven of which are dated "平成18年" and four of which are dated "2006年"); convenience for the computer (One computer manual wrote to the effect, "Please use Western dates, not Shôwa. We don't have anything against nengô, but we cannot predict leap years using them."); or a mixture of tradition and convenience (a bag of rice had stamped on it, "Product of the 17th year [of Heisei]. Milled on 05.11.22.").
- There is also the very marginal Kôki 皇紀 system. Japan established this method of counting years in 1872. In it, Year 1 was the first year of the reign of Emperor Jimmu, calculated from the Nihon Shoki to be 660 B.C. This system was mentioned in the 1898 law establishing leap years; year dates are often given in it (along with the western year) in the front of almanacs, and it was used in naming the 2600 (=1940 A.D.) Zero airplane. I also saw it on a shrine memorial stella commemorating the 26th centenary of 2601 (=1941 A.D.). However, I have never seen it used simply for a date, though there may be some people or groups who use it ideosyncratically.
- Sources of Japanese Tradition,1:43.
- Note that when dealing with Chinese, Japanese, and Okinawan rulers, and probably others from the region as well, one has to be careful of the meaning of "ascension year" in reference material. Often it refers to the year of the "1st year" of the reign year or the "1st year" of that ruler's first nengô. However, depending on the ruler, this could be either the year of or the year after the actual ascension.
- Sources of Japanese Tradition, Columbia University Press, 1:69, 76.
- Ivan Morris, The Nobility of Failure, p. 387.
- This was made official in 1979.
- The earliest example for dating a document using just the shi that I have seen myself is 1596, and I have heard of a 1569 example. However, my guess is that that just reflects my poor sample, and the form was used earlier for more informal documents. It was certainly used much earlier to refer to years.
- For example, all but the last can be found in Sanada Family Materials. The last in unambiguous, by the way, since nengô were normally changed at the beginning of the 60-year cycle.
Dates for the eras are from the Kôjien Dictionary