8ecf01ece8
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
16 lines
363 B
TypeScript
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);
|
|
}
|
|
}
|