Recently I updated LadyAda’s RTC Library for Arduino 1.0 and older versions. In arduino 1.0 the wire library changed. It is now wire.read and wire.write. I also found that when you do use the write(0), Arduino would interpret the 0 as an integer. The new wire library does not. Because of this I had to explicitly say int i = 0;
The code can be found here https://github.com/adafruit/RTClib
The red wire power goes to 3.3v. Black goes to ground. SDA (Data), the green wire, goes to Analog Pin 4. SCL (Clock), the yellow wire, goes to Analog Pin 5.