storj/web/satellite/src/utils/time.ts
VitaliiShpital 8ecf01ece8 web/satellite: credit history page implemented
WHAT:
credit history page implemented.
can be visited by clicking specific button in a free credits dropdown.

WHY:
UI didn't display remaining coupon value.
coupons and referral items (in future) are displayed in the same place.

Change-Id: I495fd7a99f2ea5117152aaf8f495bd5322f02588
2020-06-12 14:31:02 +00:00

16 lines
363 B
TypeScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
/**
* Time holds methods to operate over timestamps.
*/
export class Time {
/**
* toUnixTimestamp converts Date to unix timestamp.
* @param time
*/
public static toUnixTimestamp(time: Date): number {
return Math.floor(time.getTime() / 1000);
}
}