Open fajarsiddiqfs opened 5 years ago
👨💻Automatically updating copyright year or other dynamic timestamp. ✅Just copy a code snippet
💻JavaScript Snippets - For Static Sites
<script type="text/javascript"> document.write(new Date().getFullYear()); </script>
😻It will show
2019
If you want a bit more information, here's a snippet you can customize:
© 2010<script>new Date().getFullYear()>2010&&document.write("-"+new Date().getFullYear());</script>, Company.
It will give you:
© 2010-2019, Company.
💻PHP Snippets - For Dynamic Sites
<?php echo date("Y"); ?>
© <?php $fromYear = 2008; $thisYear = (int)date('Y'); echo $fromYear . (($fromYear != $thisYear) ? '-' . $thisYear : '');?> Company.
It will give you: © 2010-2019, Company.
It's Awesome @fajarsiddiqfs
thanks dude! yes i learn this quickly for my site!
👨💻Automatically updating copyright year or other dynamic timestamp. ✅Just copy a code snippet
💻JavaScript Snippets - For Static Sites
😻It will show
If you want a bit more information, here's a snippet you can customize:
It will give you:
💻PHP Snippets - For Dynamic Sites
😻It will show
If you want a bit more information, here's a snippet you can customize:
It will give you:
© 2010-2019, Company.