本文整理汇总了TypeScript中@angular/facade/src/lang.DateWrapper类的典型用法代码示例。如果您正苦于以下问题:TypeScript DateWrapper类的具体用法?TypeScript DateWrapper怎么用?TypeScript DateWrapper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DateWrapper类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should reportSample to call', inject([AsyncTestCompleter], (async) => {
var completeSample = [
new MeasureValues(0, DateWrapper.now(), {}), new MeasureValues(1, DateWrapper.now(), {})
];
var validSample = [completeSample[1]];
createReporters(['m1', 'm2'])
.then((r) => r.reportSample(completeSample, validSample))
.then((values) => {
expect(values).toEqual([
{'id': 'm1', 'completeSample': completeSample, 'validSample': validSample},
{'id': 'm2', 'completeSample': completeSample, 'validSample': validSample}
]);
async.done();
});
}));
示例2: reportSample
reportSample(completeSample: MeasureValues[], validSample: MeasureValues[]): Promise<any> {
var content = Json.stringify({
'description': this._description,
'completeSample': completeSample,
'validSample': validSample
});
var filePath =
`${this._path}/${this._description.id}_${DateWrapper.toMillis(this._now())}.json`;
return this._writeFile(filePath, content);
}
示例3: mv
function mv(runIndex, time, values) {
return new MeasureValues(runIndex, DateWrapper.fromMillis(time), values);
}
示例4:
{provide: Options.NOW, useValue: () => DateWrapper.fromMillis(1234)}, {
示例5:
{provide: _NOW, useValue: () => DateWrapper.now()}, {provide: _RECEIVED_DATA, useValue: false},