Compare commits
No commits in common. "5663822e0c5d3c1de92f5577de2a023ba0ab92c3" and "2f5fa70a300f34b9d7af5f63694c35a74f4ac46d" have entirely different histories.
5663822e0c
...
2f5fa70a30
@ -217,7 +217,8 @@ func api_builder() {
|
||||
year_result.Unit = DISTANCE_UNIT
|
||||
if distances[i].StartTime.Year() == time.Now().Year() {
|
||||
elapsed_days := time.Now().YearDay()
|
||||
year_result.Value = roundFloat(year_distance.Value*365/float64(elapsed_days), 2)
|
||||
relation := float64(elapsed_days) * 100 / 365
|
||||
year_result.Value = roundFloat(year_distance.Value*relation, 2)
|
||||
} else {
|
||||
year_result = year_distance
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user