summaryrefslogtreecommitdiff
path: root/tests/auto/blackbox/testdata/date-property/date-property.qbs
blob: ffd584802457838b7c061e57a2b184a6eb05cd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Product {
    type: "date"
    property var theDate: new Date(1999, 11, 31);
    Rule {
        multiplex: true
        Artifact { filePath: "dummy"; fileTags: "date" }
        prepare: {
            var cmd = new JavaScriptCommand;
            cmd.silent = true;
            cmd.sourceCode = function() {
                var d = product.theDate;
                console.info("The stored date was " + d.getFullYear() + '-' + (d.getMonth() + 1) + '-'
                             + d.getDate());
            };
            return cmd;
        }
    }
}