The registers are held in BCD (Binary Coded Decimal) format.

The first four bits (Bits 0-3) hold the units part of the Year - that is vaues 0-9. The upper four Bits (Bits 4-7) hold the 'tens' part of the year. Together they will make a value between 0-9 in the upper four Bits and 0-9 in the lower four bits. So the year 1997 (or 2097) will have $97 (Hex). The year 04 (for an implied 2004) will have $04 Hex in that Register. You can therefore store 100 years starting with $00 (for say year 2000) and ending with $99 (for say year 2099). You can only save 100 years, and which 100 years depends on your coding. Now we've gone thru the year 2000 it's usual to imply the 2000 bit and add it to the value saved in the register behind the scenes.

If you are building a device and expecting it to last beyond 100 years, then this would not necessarilly be the RTC chip of choice - personally, I won't be manning a Tech-Support hotline in 100 years time, so I don't care - it'll be somebody elses problem (now where did I put the quote for the nuclear power plant)...

In the same way the other registers hold the Seconds, Minutes, Day, Month etc in BCD format, although Bit 7 is used for other things in most of those cases, and the 'tens' part of the register only holds values in Bits 4 thru 6.

Todays' date in the various Registers could be

Year = $04
Month = $09
Day = $21

etc etc.

Do a search on DS1307 and/or BCD as there's quite a few snippets of code for this chip and other than it being I2C interface it's pretty much the same thing.

Melanie