Having said all that, Espruino has an RTC built-in - it just counts in seconds, but @mgg1010 has written a Date module which should get put online this week sometime. Normally it runs of the in-built oscillator which isn't too accurate, but it's dead easy to solder a watch crystal on: http://www.espruino.com/Clocks
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'd take a look at http://www.espruino.com/Writing+Modules - but IMO it's worth just trying to communicate with it (using http://www.espruino.com/I2C I guess) first before you start trying to write a module.
Having said all that, Espruino has an RTC built-in - it just counts in seconds, but @mgg1010 has written a Date module which should get put online this week sometime. Normally it runs of the in-built oscillator which isn't too accurate, but it's dead easy to solder a watch crystal on: http://www.espruino.com/Clocks