@hazelcast/services
Advanced tools
Comparing version 1.3.2-next.0 to 1.3.2-next.30
export declare class TimeService { | ||
static DEFAULT_FORMAT: string; | ||
static currentTimestamp(): number; | ||
static format(source: Date): string; | ||
static formatTime(source: Date): string; | ||
static formatDate(source: Date): string; | ||
} |
@@ -6,3 +6,13 @@ // Useful to override current time for our code in tests, leaving third-party code untouched. | ||
} | ||
static format(source) { | ||
return `${TimeService.formatDate(source)} ${TimeService.formatTime(source)}`; | ||
} | ||
static formatTime(source) { | ||
return `${('0' + source.getHours().toString()).slice(-2)}:${('0' + source.getMinutes().toString()).slice(-2)}:${('0' + source.getSeconds().toString()).slice(-2)}`; | ||
} | ||
static formatDate(source) { | ||
return `${source.getFullYear()}-${('0' + (source.getMonth() + 1).toString()).slice(-2)}-${('0' + source.getDate().toString()).slice(-2)}`; | ||
} | ||
} | ||
TimeService.DEFAULT_FORMAT = 'YYYY-MM-DD hh:mm:ss'; | ||
//# sourceMappingURL=time.js.map |
{ | ||
"name": "@hazelcast/services", | ||
"version": "1.3.2-next.0+4462f30", | ||
"version": "1.3.2-next.30+50f0ac7", | ||
"description": "Hazelcast shared services", | ||
@@ -37,3 +37,3 @@ "author": "", | ||
}, | ||
"gitHead": "4462f30d5e6da8bc57fe211684f1c78919818e7a" | ||
"gitHead": "50f0ac7388148e0ba4ee7f3260e224b2ddbd5ed3" | ||
} |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
20089
125
2