A basic php sleeps until christmas countdown. With options for custom days and or timezones.
To get started just clone this repository into your website, or if you're not bothered about this text just the following files will do:
- .htaccess
- index.php
- error.php
Any webserver with php. If you're not using apache you'll have to convert the .htaccess file for your chosen webserver.
If you call the index.php without any variables it will output the amount of sleeps until Christmas and it will assume you're in the UK
If there are no errors, the script outputs only text, not a html page. This is so it can be used as input for another script or app.
There are xx sleeps to Christmas.
There are 3 custom options:
- tz: TimeZone any php recognised TimeZone
- td: Target day. In case you want a day other than christmas, in any format recognised by strtotime
- tdn: Target day name. So the script will know what to call your day
You can call any number of options or none
/index.php?tz=Europe/Amsterdam&tdn="Dutch Christmas"
This project is licensed under GNU GPL v3
- Parsing of the README.md by Parsedown