CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Date FORMATING Function DEFECTIVE

Print topic Send  topic

Author Message
Kevin A
Posted: 11/06/2002, 10:01 AM

Meeting on the second Wednesday of the week like April 9th 2003 show Sunday.
The newspaper article -> http://www.sltrib.com/11062002/utah/13831.htm points this out;
"The April, July and October meetings are scheduled for Sunday mornings at the Holladay Public Library, which is closed Sundays"

I ask for this problem to be addressed on 8/13/2002 ticket number 983887397, now it will cost me big time.

I have changed the date format to mm/dd/yyyy from long.
raincrow
Posted: 11/06/2002, 3:35 PM

Which date function on which platform? As far as I have ever been able to tell, the format of a date string is dependant on the value that comes out of the database and the way you format it in a Before Show event.
yodabear
Posted: 11/06/2002, 4:22 PM

From the News-Group
Originally Posted by Jonathan Berens

Thank you JB


------------------quote----------------
michael

There is a missing line of code in the fuction "CCParseDate" of common.php -
see the snippet below

Maybe Yes Software will fix it in the next release

Jonathan

// Begin bug ammend to correct problem with invalid date - weekday does not
match dd/mm/yy
if($DateArray[ccsYear] < 1971 && $DateArray[ccsYear] > 0)
{
$DateArray[ccsAppropriateYear] = $DateArray[ccsYear] + intval((2000 -
$DateArray[ccsYear]) / 28) * 28;
}
else
{
if ($DateArray[ccsYear] > 2030)
{
$DateArray[ccsAppropriateYear] = $DateArray[ccsYear] -
intval(($DateArray[ccsYear] - 2000) / 28) * 28;
}
else
{
$DateArray[ccsAppropriateYear] = $DateArray[ccsYear]; // Added
line
}
}
// End bug amend to date




michael weaver wrote in message
news:aq9f0t$11n$1@news.codecharge.com...
> Hi, I'm storing dates in a mysql database in the following format:
> yyyy-mm-dd (ex: 2002-11-05). Everything has been going fine until I just
> noticed that when I display the dates as dddd, mmmm d, yyyy (ex: Tuesday,
> November 5, 2002) it gives me the wrong day. For instance, for a database
> entry for today, it will read 2002-11-05 in the database, but when it
> displays it will say Sunday, November 5, 2002 instead of Tuesday November
5,
> 2002.
>
> Using PHP+templates. Same behaviour on two linux servers. Everything else
> seems to be going well.
>
> Anyone have some advice?
>
> michael
>
>

------------endquote-----------------------
Kevin A
Posted: 11/07/2002, 6:55 AM

Since CCS is broken and the vendor refuses to fix a simple date format problem that makes customers VERY uncomfortable (if it can’t get the date right what else could be wrong?) then those of us that have invested the time and money into CCS are left with hacking each and every project with workarounds.
This problem appears with PHP4 & templates

To simplify the fix: (thanks Originally Posted by Jonathan Berens and yodabear)

Search for $DateArray[ccsAppropriateYear] = $DateArray[ccsYear] - intval(($DateArray[ccsYear] - 2000) / 28) * 28;

Replace with $DateArray[ccsAppropriateYear] = $DateArray[ccsYear] - intval(($DateArray[ccsYear] - 2000) / 28) * 28;
else //added line
$DateArray[ccsAppropriateYear] = $DateArray[ccsYear]; // Added line

After 15 projects this turned out to be the fastest way to FIX CCS.
CSS: This is a HOTFIX problem that should not be let go. I had someone kind enough to berate my sight alearting me of the problem, how many others just laughed and moved on never to return? After all, if they can't get the date right then the rest of the information at the sight can not be trusted....

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.