Please see the slide.
Please write a simple clock application, which has the following features.
- (30%) Display current time in YYYY/MM/dd hh:mm:ss format (e.g.: 2015/11/02 19:02:29), and update it every second.
- (+5%) Display week.
- (+5%) Display timezone.
- (30%) Stopwatch that displays in mm:ss.cc (e.g.: 00:00.00). Users can click buttons to start, pause and reset the stopwatch.
- start: Starts the timer, increases the timer every 1/100 second.
- pause: Pauses the timer, the timer can be resumed by start.
- reset: Resets the timer to zero.
- (40%) Users can schedule an alarm that will trigger in future (at most 59min 59sec).
- NOTE: Your application should be able to notify users even if they closed the application.
- Fork this repository.
- Modify files in
simple_clock
directory. - Create a pull request that have your student ID in the title.
Please create the pull request before the end of 2015/11/13 (UTC+8).
If you turn in after 2015/11/13 and before the end of 2015/11/20 (UTC+8), your score will multiply with 80%.
- You can use Date to get the desired time.
- You can use setInterval to periodically do something.
- You can use Alarm API to schedule messages to system.
- You can use Notifications API to send system-level notifications.
Some examples were borrowed from somewhere.
Cloned from https://github.com/soapdog/firefoxos-sample-app-telnet-client .
Copied from https://developer.mozilla.org/en-US/docs/Web/API/Detecting_device_orientation .
Cloned from https://github.com/mdn/to-do-notifications/tree/gh-pages .
Cloned from https://github.com/mdn/emogotchi .