- Paperback: 560 pages
- Publisher: CRC Press; 1 edition (May 1, 1998)
- Language: English
- ISBN-10: 0879304960
- ISBN-13: 978-0879304966
- Product Dimensions: 7 x 1.5 x 9.2 inches
- Shipping Weight: 2.4 pounds
- Average Customer Review: 7 customer reviews
- Amazon Best Sellers Rank: #1,706,924 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Standard C Date/Time Library: Programming the World's Calendars and Clocks 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Lance Latham's Standard C Date/Time Library aims to solve the problem with time and calendars on computers. This book publishes the author's C library with functions (included on CD-ROM) for many of the world's calendars, interspersed with some truly fascinating historical material that makes sense of humankind's myriad attempts to get a handle on time.
The Standard C Date/Time Library begins with a description of the Y2K problem. The author then proceeds to show that definitions of years, months, and days are subject to different standards, many of which are the result of "applied astronomy." He develops his comprehensive solution using the Julian calendar and represents hours and minutes as fractions of days. His Standard C Date/Time Library (STDTL) offers extremely comprehensive functionality, allowing you to calculate differences between days and days of the week, as well as calculations for holidays.
The author intersperses source code listings with wide-ranging descriptions of calendars and their inconsistencies. For the treatment of the Western calendar and ISO 8601 standard time functions, this code library is worth it. However, the author goes much further and offers code for and descriptions of all the major calendars of the world, including non-Western calendars and ancient calendar systems. --Richard Dragan
About the Author
Lance Latham is the principal of Resource Management Systems, Inc., a software development firm in McAllen, Texas, and has been programming on a wide range of platforms for three decades. Although he has programmed in more languages than he wants to count, Lance now primarily codes in C for developing systems that manage critical resources in enterprises ranging from health care to jewelry marketing.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
Even if you think you already have an adequate library of date/time code in your shop, don't be too sure until you've tested it using the methods illustrated in Lance Latham's own test programs, included in the CD that accompanies the book. The Year 2000 bug is not the only one infesting date/time code!
For programmers with historical, international, or religious calendar problems to solve, this book is an invaluable reference for a wide range of past and present calendars and timekeeping systems. Lance Latham also includes a section on the forward-looking ISO 8601 standard, which is enjoying increasing usage in Europe.
I recommend this book even if you write computer programs in some language other than C. The routines in this book are easy to translate into other languages, even for programmers with only a "reading" knowledge of C. The correct usage of the routines is exhaustively documented, with all parameters, returns, and limitations spelled out for you. Whichever language you use, following Lance Latham's approach will lead to concise, fast, and reliable code.
My only caveat about this book is that the algorithms underlying the routines are not always adequately explained. Sometimes we are told no more than that an algorithm is a "standard Gregorian proleptic calendar conversion routine." Testing will verify that it does somehow give the correct results, but you may still be tempted to spend hours studying it to figure out how it works.
The author, Lance Latham, is also easy to reach via e-mail and always responsive to questions and comments on calendar and time issues.
Another excellent book along the same lines is Calendrical Calculations by Nachum Dershowitz and Edward M. Reingold, but does not cover as much history and as many calendars as Latham's book.
Review by Ira J. Lund, author of the Universal Calendar Calculator.
I went to the support web site to look up or report this errata. It's gone. Unforgivable. The correct algorithm is available from (the U.S. Naval Observatory's website). The transcription error from this algorithm in Fortran to C is minor, but enough to get me irate. A book that is sold on accuracy and Y2K busting should get dates right. You'd have thought that given a function and it's inverse, that the author would have checked that f(f^-1(x)) == x and f^-1(f(x)) == x. But no...
Apart from that, you'll never use many of the other calendric functions. My faith in this tome is severly shaken.
Not often do one see date/time routines combined with the historical background of the calendars and their problems and again, Lance reveal himself as an expert in calendars from many, many countries in his discussion of the calendars. The description of the various calendars shows his deep understanding of the problems his codes solves. Included is a CD-ROM with the entire text of SCDTL, program codes, explanations and many calendar details that are not listed in the book.
It has been a pleasure to read the book and learn from it.
Otherwise the book is very complete and has a lot of interesting explanations of different calendars. It even has moon functions, although they are limited to about +/- 100 years from AD 2000 (it says the full versions are too processor intensive). Great book!