5 Rappen CHF rounding (Rounding to nearest 5 cents) + Swiss Franc + Angular Pipe

Balram Chavan
2 min readDec 12, 2022

How would you implement conversation logic for below requirements?

For example,

  • Values between CHF 0,975 and CHF 1,024 will be rounded to CHF 1,00
  • Values between CHF 1,025 and CHF 1,074 will be rounded to CHF 1,05
  • Values between CHF 1,075 and CHF 1,124…

--

--