From: lee@milo.stanford.edu (Fung Fung Lee)
Subject: Software release announcement - lunar 2.1
Keywords: lunar calendar, chinese character, software
Organization: Stanford University
Date: Thu, 13 Aug 92 21:09:18 GMT

	     Software release announcement - lunar 2.1

*The software is available on the anonymous ftp server ahkcus.org
*as src/unix/lunar-2.1.tar.Z

*This program has been developed on and for UNIX, but it should run on
*other machines with suitable ANSI-compliant C compilers.



  		Lunar 2.1: A Calendar Conversion Program
				for
	Gregorian Solar Calendar and Chinese Lunar Calendar
	---------------------------------------------------

	By Fung F. Lee and Ricky Yeung

	Special thanks to Hwei Chen Ti (chetihc@nuscc.nus.sg or
	CHETIHC@NUSVM.Bitnet) who extended the tables from 2001 to 2049. 


	You may choose to output in English or Chinese (GB).


Example
% lunar 1992 8 11 20
Lunar Version 2.1 (July 23, 1992)

Solar : 1992.8.11.20	Tuesday
Lunar : 1992.7.13.20	ShengXiao: Monkey
GanZhi: Ren2-Shen1.Wu4-Shen1.Ji3-Wei4.Jia3-Xu1
        (GanZhi Order)	9-9.5-9.6-8.1-11
        (JiaZi Cycle)	9.45.56.11

BaZi (8-characters) according to 'Four Column Calculation':
        Ren2-Shen1.Wu4-Shen1.Ji3-Wei4.Jia3-Xu1
        (GanZhi Order)	9-9.5-9.6-8.1-11
        (JiaZi Cycle)	9.45.56.11



For those, such as many of the readers of alt.chinese.text,
who have the tools to read HZ files:

% lunar -h -i 1992 7 13 20 | gb2hz 
Lunar Version 2.1 (July 23, 1992)

~{Qt@z#:!!~}1992~{Dj~} 8~{TB~}11~{HU~}20~{J1!!PGFZ6~~}
~{Ru@z#:!!~}1992~{Dj~} 7~{TB~}13~{HUPgJ1!!IzP$Jt:o~}
~{8IV'#:!!HIIjDj!!NlIjTB!!<:N4HU!!<WPgJ1!!~}
~{SCKDVyIqKcMFKcV.J13=0KWV#:!!HIIjDj!!NlIjTB!!<:N4HU!!<WPgJ1!!~}

References:
1. "Zhong1guo2 yin1yang2 ri4yue4 dui4zhao4 wan4nian2li4" by Lin2 Qi3yuan2.
   ~{!6VP9zRuQtHUTB6TUUMrDj@z!7#.AV~}
2. "Ming4li3 ge2xin1 zi3ping2 cui4yan2" by Xu2 Le4wu2.
   ~{!6C|@m8oPBWSF=4bQT!7#.Pl~}
3. Da1zhong4 wan4nian2li4.
   ~{!64sVZMrDj@z!7~}

* gb2hz is available as part of ahkcus.org:src/unix/HZ-2.0.tar.Z


The UNIX manual pages ....


   NAME
     lunar (version 2.1) - a calendar conversion utility

   SYNTAX
     lunar [ -h ] [ -b ] [ -i ] [ -l ] year month day [ hour ]

   DESCRIPTION
     The lunar program performs date conversion between the Gregorian Solar
     Calendar (SC) and the Chinese Lunar Calendar (LC).  Given a date in
     either calendar, the program also outputs the corresponding "shengxiao"
     (animal of the year) and "ganzhi" characters.  The date range currently
     covered is from about 1900 A.D. to 2049 A.D.

     For the sake of convenience, we choose the convention such that the
     solar and lunar year numbers of the first day of a lunar year are the
     same.  For example, SC 1991.2.15 is LC 1991.1.1, while SC 1991.2.14 is
     LC 1990.12.30.  Moreover, we choose the convention such that the solar
     and lunar hour numbers (in 24-hour clock) of a date are the same,
     although a lunar day starts at 23:00 of a solar day. This means that SC
     1991.2.15.23 is LC 1991.1.2.23, while SC 1991.2.16.0 is LC 1991.1.2.0,
     and SC 1991.2.16.1 is LC 1991.1.2.1.

     The standard time of the Lunar Calendar is Beijing (Hong Kong) Standard
     Time, not GMT.  Be sure to adjust appropriately for other time zones and
     "Day-light Saving Time".

     In the Lunar Calendar, a normal year has 12 months, and a leap year
     (run-nian) has 13 months, where the extra month is called a "leap month"
     (run-yue).  For example, the leap month that follows immediately the 6-
     th lunar month is called the 6-th leap month.  A (leap) month is either
     a short or long one, which has 29 or 30 days respectively.

     There are 10 gan's and 12 zhi's.  The ganzhi labeling of the year,
     month, day and hour of a date is a member of the Cartesian product
     GxGxGxG, where G = {1,2,...,60}.  For example, "jia-zi" is 1, "yi-chou"
     is 2, and so on.  The ganzhi of the j-th leap month is the same as that
     of the j-th month.

     The possible options are

     b    output ganzhi in special "bitmap" characters.

     h    output hanzi or Chinese characters encoded in (highest-bit-set) GB
          code.

     i    convert a lunar date to solar date.  The default is to convert a
          solar date to a lunar date.

     l    indicate the month is a lunar leap month.  This option is meaning-
          ful only when the "-i" option is used.





                                                                            1






   lunar(1)                                                      23 July 1992


   COPYRIGHT
     Copyright (C) 1988, 1989, 1991, 1992    Fung F. Lee and Ricky Yeung

     All rights reserved.  Permission to copy and distribute verbatim copies
     of the source code and accompanied documents for non-commercial purposes
     is granted, but changing them is not allowed.  There is absolutely no
     warranty for this program.

   AUTHORS
     Fung F. Lee and Ricky Yeung

   ACKNOWLEDGEMENT
     The special "bitmap" file "lunar.bitmap" was contributed by Weimin Liu.

     Special thanks to Hwei Chen Ti who extended the tables from 2001 to
     2049.

   BUGS
     Bug reports and comments should be sent to Ricky.Yeung@Eng.Sun.Com or
     lee@umunhum.stanford.edu.

   DISCLAIMER
     This software has no connection with our employers.

































   2