[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-tracker] [bugs #8315] Function convertDate in class.dateti

From: Dr. Christian Böttger
Subject: [Phpgroupware-tracker] [bugs #8315] Function convertDate in does not work with the d-M-Y format that can selected in Preferences
Date: Fri, 26 Mar 2004 15:53:17 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040113

This mail is an automated notification from the bugs tracker
 of the project: phpGroupWare.

[bugs #8315] Latest Modifications:

Changes by: 
                Dr. Christian Böttger <address@hidden>
                Fri 03/26/04 at 20:53 (Europe/Berlin)

            What     | Removed                   | Added
            Priority | 5 - Normal                | 7 - High
         Assigned to | None                      | skwashd

------------------ Additional Follow-up Comments ----------------------------
This might be something for Powerstat to fix ...

[bugs #8315] Full Item Snapshot:

URL: <>
Project: phpGroupWare
Submitted by: Alan Oshry
On: Fri 03/26/04 at 20:43

Category:  API - phpGWapi
Item Group: release
Severity:  5 - Average
Priority:  7 - High
Resolution:  None
Assigned to:  skwashd
Status:  Open
Component Version:  CVS
Platform Version:  MS Windows
Reproducibility:  Every Time

Summary:  Function convertDate in does not work with the 
d-M-Y format that can selected in Preferences

Original Submission:  The function works like this, and returns the new 
formatted date:

convertDate($date, $dateFormat, $newFormat)

The function does this by finding the seperator used to seperate month, day, 
and year. Then builds an array of the month day values, and maps each value to 
the d/m/y format of the date passed.

For Example: Array ( [d] => 26 [m] => 03 [Y] => 2005 )

Then it finds the seperator of the format that you want the date to output the 
date to. Then builds an array of the month/day/year new format

And ultimately builds the new formmated date by starting from the order of the 
desired format, and matching the first value key with the old formmated value 

An Example of what would make it not work:

convertDate('30-Mar-2004', 'd-M-Y', 'm-d-Y')

The passed date, turns into this:
For Example: Array ( [d] => 30 [M] => Mar [Y] => 2004 )

Notice how month is formmated as 'M' in the old format, and 'm' in the new 
format. At the end of the function when its building the end array that puts 
the old formmated date into the new formmated date, it looks for the 'm', but 
it cant find it, and returns a blank.

So the outcome will be: /30/2004

d-M-Y is the only dateformat Preference that is different than the rest because 
it has the 'M' instead of 'm'.

I am not sure what the best way to fix this is, but thought I would explain 
what is happening.

- scibe

Follow-up Comments

Date: Fri 03/26/04 at 20:53         By: cboettger
This might be something for Powerstat to fix ...

CC List

CC Address                          | Comment
khofmann --AT-- probusiness --DOT-- de | Powerstat may be able to help

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]