July 2011
Intermediate to advanced
276 pages
5h 11m
English
We can be sure to keep our users right on time by giving them a running clock that updates every second.
UNIX time, measured in seconds from an arbitrary date in the 1970s, can be difficult to parse out into human-readable time. MooTools makes this much easier in the MooTools MoreDate class. There are also shortcuts for the parameter that can be passed to Date.get():
The seasoned coder will appreciate that all raw JavaScript date elements are available; MooTools only extends the native class.
Making a clock is a task that comes across our desks perennially.
<script type="text/javascript" src="mootools-1.3.0.js"></script> ...