2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-05 00:00:14 +00:00

fix all time range

This commit is contained in:
Miguel Mota 2018-05-02 15:55:43 -07:00
parent 4cd7f0c03e
commit c2fd3848aa
2 changed files with 2 additions and 5 deletions

View File

@ -48,9 +48,6 @@ func (ct *Cointop) chartPoints(maxX int, coin string) error {
if ct.selectedchartrange == "YTD" {
rangeseconds = ct.chartrangesmap["1Y"]
}
if ct.selectedchartrange == "All Time" {
rangeseconds = ct.chartrangesmap["1Y"]
}
now := time.Now()
nowseconds := now.Unix()

View File

@ -103,8 +103,8 @@ func Run() {
"All Time",
},
chartrangesmap: map[string]time.Duration{
"All Time": time.Duration(1 * time.Second),
"YTD": time.Duration(1 * time.Second),
"All Time": time.Duration(24 * 7 * 4 * 12 * 5 * time.Hour),
"YTD": time.Duration(24 * 7 * 4 * 12 * time.Hour), // this will be calculated
"1Y": time.Duration(24 * 7 * 4 * 12 * time.Hour),
"6M": time.Duration(24 * 7 * 4 * 6 * time.Hour),
"3M": time.Duration(24 * 7 * 4 * 3 * time.Hour),