Re: Problem on Date Function

From: Date: Tue, 03 Jun 2003 09:42:47 +0000
Subject: Re: Problem on Date Function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-149908@lists.php.net to get a copy of this message
have a look at date() and mktime(): from the manual: $tomorrow = mktime(0, 0, 0, date("m"), date ("d")+1, date("Y")); ciao SVEN "Jack" <nedcor4@nedcor.com.hk> schrieb im Newsbeitrag news:20030603094058.12746.qmail@pb1.pair.com... > Dear all > Here is the situation : > > Our automation system will generate a large number of pdf file to a specific > folder every day. The name format for all these pdf file is > "xxxx.20030602.pdf". > xxxx is the name of the file, > 20030602 is last working date. > > > what i want to do is: > 1. create a sub-folder inside this specific folder, and name it to current > month(Jun-2003) > 2. move the pdf which is not containning last working's file name to this > new create sub-folder. > 3. the files with last working date's name will stay on the specific folder. > > question : > > 1. I had used a date function with "w" parameter to check if current date i > execute the script is monday (1), if so , i tell the script to take the > current date minus 3, so the date will become last friday (as our last > working day), then i can base on this date to tell the script which files > should not be move to sub-folder! > > q: how i can do a date subtraction in php? (eg. "2003-06-02" - 3 = > "2003-05-30") > >

« previous php.general (#149908) next »