I had a perl script which I ran every day for several years. It had to form a URL which included the current date. The format was slightly different on Sunday. It made perfect sense to use localtime to get the date and day-of-week and to use strftime (FUNCTIONS) to format it.