Discount period struggles

I can’t get my mind right about a discount periods Examples: 1) when it’s written bla bla bla is maturing in 20 years => 19 years discount period is used 2) when it’s about let’s say 10 year liability and u r asked to calculate PV after 1 year => 8 year discount period is used 3) If sth is going to be paid in 4 years => 3 years discount period is used… So… When do I use years to maturity-1, or -2 or just years to maturity? Thanks in advance!