PaperCut Print Script of the Month #2 – Days until Christmas

PaperCut Print Script – Days until Christmas


It is almost that time of year again where we get some time off work and eat until we nearly explode and watch whatever James Bond film happens to be on the TV. This month we are going to create a PaperCut Print Script to tell the users how many days there are to go until the big day, so grab a cup of coffee or tea and let’s begin.

We begin our script this month by creating a new Date object this will make it easier to work with dates which are usually done by converting the date to a number and working from there, this is called Unix Time or POSIX / Epoch Time.

Next up is to set the date we want to use for our countdown and convert it to Unix Time using the Date.parse() method and also set a variable to today’s date that we will use later.

So now we need to do a little bit of math to work out what difference is between today and 25th December then convert it to a number that will actually mean something to a user and also round it to the nearest whole number.

All we need to do now is add in a few if statements to handle the three possible outcomes, then send the user a message that is relevant. We only have three possible cases to take into consideration here; Christmas has not yet happened, Christmas has happened and today is Christmas (We don’t recommend working on Christmas day unless something important is on fire).

That is it now you have a script you can use to let your users know how many days there are until Christmas, you could restrict this to certain groups of users or even use it to remind people of any events you have coming up.

As always the complete print script is below and if you have your own requirements for a print script and you don’t have the time or in-house experience to make it you can find out how we can help you by sending an email to our sales team at

PaperCut Print Script
Latest News from Jonathan Bennetts

Automate Balance Updates in PaperCut

A few days ago one of our resellers came to us with an interesting problem. T...

Written by: Jonathan Bennetts


Grant temporary access to printers using PaperCut

How do I grant temporary access to company printers?   One of our rese...

Written by: Jonathan Bennetts



Selectec have proved to be a great company to partner with. I have worked with Selectec for 7 years now, and am always impressed with their professionalism and eagerness to help. Both with sales and technical support, Selectec have always strived to give any information that I need, and gone above and beyond when I’ve needed a little extra help. I can’t recommend them highly enough.

Jon Farquharson Abbey Business Group
This website works best using cookies which are currently disabled. We use cookies to help with our site analytics to improve our services.
Back to Top ↑