← Back to team overview

ubuntu-phone team mailing list archive

Re: [qml] Importing moment.js

 

Does nobody have any idea how to get a Javascript library working in
QML? Or, any other ideas how to handle good date formatting? I would
expect this to be quite important in several of the core apps and other
parts of Ubuntu Touch.

On Tue, 2013-11-19 at 10:31 +0000, Sam Bull wrote:
> I'm looking for a way to format dates nicely. It looks like moment.js
> will give me what I want, but I can't work out how to use it from QML or
> a Javascript file.
> 
> I've downloaded the with-langs file from their website, and then tried
> "import 'moment.js' as moment" and "Qt.include('moment.js')", but still
> can't seem to use it.
> 
> Any ideas on how to make this work?


Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References