Cows allows to automatically compute and insert into your pages:
the date of last modify relative to the page you're creating;
the date of last modify relative to a given file;
the size of a given file.
These features will spare you some boring operation and reduce chances of an error. Maintaining your site will also be easier, since every time you run Cows on a given file, these informations will be automatically updated.
This function returns a string representing the current date according to the format
described by format_string
; format_string
can be any valid expression:
date ("format_string");
date (variable_storing_format);
It simply returns format_string
interpreting the
following sequences:
current year (1972 ...)
month (1..12)
day of month ( 1..31)
full month name (January..December)
full weekday name (Sunday..Saturday)
hour
minutes
seconds
Full month names and full weekday names are stored in arrays _months
[ ] and _days
[ ]; you can
simply override these variables in order to change the names. As an example, if your site
is written in Italian, you can place this definition in a file and include it everywhere
you need:
_months [ ] = { "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre" }; _days [ ] = { "Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato" };
echo (date ("Updated: #d #M #y"));
displays current date according to the following format:
Updated: 19 October 2003
This manual can be downloaded from http://www.g-cows.org/.