All Scripts backed by 10 years in business, free support, free updates and a 30 day money back guarantee.
Download Purchase Programming F.A.Q. Support Contact
Commercial Perl Scripts
All Form Pro Updated
Count It
Form Mailer + Attachments
Client File Manager
Da Godfaddah
Dropbox Updated
FAQ Builder
HT Manager Updated
RegisterHT
Mailing List Server
Page Updater - Text
Page Updater Pro Updated
PS Guestbook Updated
PS Lightning Search Updated
Quick File Mailer
Quick MySQL
Select-A-File
Upload Center
Free Perl Scripts
Access Log Viewer
All Form
Epoch Converter
Error Log Viewer
Invoice Center
PS Upload
Question Manager
Quick CHMOD
QuickHT
Site File Finder
Site File Lister
SSI Tag Maker
Perl Modules
Monger Calendar
Monger File
Monger Mail
Monger Persist
JavaScript Generators
PopUp Windows
Meta Gen
RGB / Hex Converter
Page Colors
Sudoku
Tutorials and FAQs
Cookies
Using CuteFTP
Using WS_FTP
Installing Scripts
Debugging
Utilities
env_vars.pl
backup.pl
restore.pl
check_email.pl
date.pl
dayname.pl
fileage.pl
format_length.pl
format_url.pl
getfile.pl
parse.pl
redirect_html.pl
Free Services
Epoch Converter
TLD Registries
RGB/Hex FInder
Colour Checker
ASCII Codes
Policies
Terms and Conditions
Privacy Policy
Refund Policy
Site Map

Form Processor with no SPAM from robots.

Anti-spam, anti-robot, anti-flame, Guestbook for your website.

Manage Remote websites from your website. Allow clients to update sections of their own web pages.

Secure file manager with upload progress meter. A printer's best friend. Find out more.

Utility Name: date.pl
Platform: UNIX or Linux
Requires: Perl4 or higher


This subroutine takes most of the guess out of working with dates in Perl programs. This program, after being called returns a few useful time/date options but is VERY EASY TO RECONFIGURE! Below are the instructions on how to use the script and a list of what is returned. You can, with a little fiddling, create any date combo you want!

Bonus: How many times have you wanted to generate a unique ID number in your program? Instead of fiddling with rand() and srand(), this script/subroutine returns a unique number that the odds of being duplicated are insanely high. It returns an eighteen digit unique number based on the date an process id of the execution of the program calling the script!

To use the sub/script:

At any point in your script before you call it, you must "require" the script so that it may be accessible to your program. This is done by the following statement:

require 'date.pl';

After that you just call the script before attempting to parse any form data:

&Date;

(NOTE: In the subroutine script there is a place for you to set an offset if you are not in the same timezone as your server.)

Returns:

  • $DATE returns Date in the format "yyyy/mm/dd".
  • $TIME returns Time in the format "hh:mm:ss".
  • $PID_DATE Unique number in the format "nnnnnnnnnnnnnnnnnn";
Other variables from the subroutine you can use:
  • $MONTH returns Month (number)
  • $THISYEAR returns Year
  • $DAYOFMONTH returns Day of Month (number)

(NOTE: This script is easy to re-write to generate word values for the month and day of week. Consider it a test!)

  ©2009 All rights reserved, PerlServices.net. Website hosting by LinuxHostingPlans.com