[wp-trac] [WordPress Trac] #10309: Publish Date (Schedule) does not handle inputs properly.

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 7 07:28:15 UTC 2009


#10309: Publish Date (Schedule) does not handle inputs properly.
--------------------------+-------------------------------------------------
 Reporter:  hakre         |       Owner:  camper2020 
     Type:  defect (bug)  |      Status:  accepted   
 Priority:  normal        |   Milestone:  2.8.4      
Component:  Date/Time     |     Version:  2.8        
 Severity:  major         |    Keywords:  needs-patch
--------------------------+-------------------------------------------------
Changes (by camper2020):

  * owner:  => camper2020
  * status:  new => accepted


Comment:

 Hi all, I am a third year student at the University of Pretoria in South
 Africa.

 We were given a task of finding a well known open source architecture and
 atte,pting to write a patch for it. I chose wordpress and this partucular
 ticket.

 I believe I have managed to fix this error, not in the javascript but in
 the "post.php" file. I have uploaded the new file. <Seen Above>

 List of changes:

 - Date no longer resets to Jan 1 1970.

 - If an invalid date is entered, month and year are still accepted, and
 day resets to current day of month on user's local machine. (Not as much
 overhead to edit from there)

 - Patch tests per month, i.e. Jan can have 31 days, April only 30 etc.

 - Patch takes leap years into account and so for February, 28 days are the
 max allowed unless the given year corresponds to a leap year test, if so,
 February can accept 29 days.

 - This patch is obviously only for Gregorian calendars :-)

 I hope that this is satisfactory and that my code meets the standards of
 your great program. I have written two new methods: 'checkDates()' and
 'checkDays()'.

 The page still seems to load rather efficiently.

 Any further queries: email me on johnston.jasond at gmail.com

 Kind Regards

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10309#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list