|
|
|
<?
//works only from 2001-2049, needs a modulo function, e.g. from bcmath or something like that:
//function mod($n,$d){return($n-$d*intval($n/$d));}
//eastersunday(2003) delivers for the 20th. this is the 20th of april.
//not perfect and complete but quick and dirty, often needed in database calculus.
function eastersunday($year){
$a=mod($year,19);
$b=mod($year,4);
$c=mod($year,7);
$temp=19*$a+24;
$d=mod($temp,30);
$temp=2*$b+4*$c+6*$d+5;
$e=mod($temp,7);
return($d+$e-9);
}
?> |
|
| Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | Simple conversion functions to change MySQL dates to arrays, arrays to MySQL dates.
Categories : PHP, Arrays, Date Time, Databases, MySQL | | | Monthly and Daily Upcoming Events calendar. Categories : Date Time, PostgreSQL, PHP, Calendar, Databases | | | PHP Calendar Web App Categories : PHP, Databases, MySQL, Date Time, Calendar | | | List people whose birthdays fall on the current Day and Month
Categories : Databases, Date Time, MySQL, PHP | | | In Mysql, the 'datetime' data type is used to store date that looks like '2007-10-16 16:26:30'. we are going to design a function called mysqldate() that takes a mysql date and output format as input and outputs a well formated date. Categories : PHP, Date Time, Databases, MySQL | | | Logs hits to any page which includes it. Automatically utilises page access information left behind by PHP/FI2.0. Categories : Databases, PHP, mSQL, Databases | | | Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first day name of the month, occurrences of Sun, occurrences of Mon, etc. Allows you to calculate number of working hours exclude Holidays. Categories : Calendar, Date Time, PHP, Databases, MySQL | | | Data Retrieve from Mysql using AJAX with PHP Categories : PHP, AJAX, Date Time, Databases, MySQL | | | formating MySQL Timestamp to get a propper Output.
related : Timestamp, ereg_replace, mysql, substr Categories : MySQL, PHP, Date Time, Databases | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | | | Query Timer Categories : PHP, Databases, Date Time | | | mysql date/time converters Categories : PHP, MySQL, Databases, Date Time | | | A PHP Script that shows how to use FTP to run a shell script, read two local files and update data in a database. Categories : PHP, Filesystem, FTP, Date Time, Databases | | | Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time | |
|
|