I'm writing an app using PebbleJS in CloudPebble and would like to have functionality similar to that provided by Moment.js and xdate.js. Specifically, I am interested in:
- turning a datetime into a string using a custom format string
- adding and subtracting days/weeks/months/years from the current datetime
These modules claim to support CommonJS, so I've tried adding the files to CloudPebble and importing with something like var Moment = require('moment');
. When I do this, the app will simply fail to run. I'm not even sure that it compiles.
All I can find in the logs is:
[PHONE] pebble-app.js:?: [PHONESIM] [WARNING] Exception decoding QemuInboundPacket.footer