Day / Night Toggle

Is there a way to toggle a specific day / Night condition ?
This would be so if someone left the office the phones would then ring through to a mobile after say 6 rings…
We have Aastra phones.
Thanks.