Skip to content

Commit

Permalink
make sure we use a reasonable number of decimal points for converted …
Browse files Browse the repository at this point in the history
…temps.
  • Loading branch information
AnalogJ committed May 26, 2022
1 parent 4ee947d commit e95b44c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/frontend/src/app/shared/temperature.pipe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Pipe, PipeTransform } from '@angular/core';
import {formatNumber} from "@angular/common";

@Pipe({
name: 'temperature'
Expand All @@ -21,9 +22,9 @@ export class TemperaturePipe implements PipeTransform {
break
}
if(includeUnits){
return convertedTemp + convertedUnitSuffix
return formatNumber(convertedTemp, 'en-US') + convertedUnitSuffix
} else {
return convertedTemp
return formatNumber(convertedTemp, 'en-US',)
}
}

Expand Down

0 comments on commit e95b44c

Please sign in to comment.