[Python-checkins] python/nondist/sandbox/datetime doc.txt,1.21,1.22 obj_datetime.c,1.27,1.28

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Fri, 06 Dec 2002 13:03:18 -0800


Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv7634

Modified Files:
	doc.txt obj_datetime.c 
Log Message:
Finished datetime.isoformat.


Index: doc.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/doc.txt,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** doc.txt	6 Dec 2002 20:26:23 -0000	1.21
--- doc.txt	6 Dec 2002 21:03:07 -0000	1.22
***************
*** 471,480 ****
      same as date.isocalendar().
  
!   XXX isoformat() needs work.
!   - isoformat()
!     Return a string representing the date in ISO 8601 format,
!     'YYYY-MM-DD'.  For example,
!     date(2002, 12, 4).isoformat() == '2002-12-04'.
!     str(d) is equivalent to d.isoformat().
  
    - ctime()
--- 471,482 ----
      same as date.isocalendar().
  
!   - isoformat(sep='T')
!     Return a string representing the date and time in ISO 8601 format,
!         YYYY-MM-DDTHH:MM:SS.mmmmmm
!     Optional argument sep (default 'T') is a one-character separator,
!     placed between the date and time portions of the result.  For example,
!         datetime(2002, 12, 4, 1, 2, 3, 4).isoformat(' ') ==
!         '2002-12-04 01:02:03.000004'
!     str(d) is equivalent to d.isoformat(' ').
  
    - ctime()

Index: obj_datetime.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/obj_datetime.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** obj_datetime.c	6 Dec 2002 17:21:15 -0000	1.27
--- obj_datetime.c	6 Dec 2002 21:03:09 -0000	1.28
***************
*** 356,362 ****
  {
  	char buffer[1000];
! 	char *typename;
  
- 	typename = self->ob_type->tp_name;
  	if (GET_MICROSECOND(self)) {
  		PyOS_snprintf(buffer, sizeof(buffer),
--- 356,361 ----
  {
  	char buffer[1000];
! 	char *typename = self->ob_type->tp_name;
  
  	if (GET_MICROSECOND(self)) {
  		PyOS_snprintf(buffer, sizeof(buffer),
***************
*** 388,392 ****
  datetime_isoformat_helper(PyDateTime_DateTime *self, char sep)
  {
! 	char buffer[128];
  	char *cp;
  
--- 387,391 ----
  datetime_isoformat_helper(PyDateTime_DateTime *self, char sep)
  {
! 	char buffer[100];
  	char *cp;