summaryrefslogtreecommitdiffstats
path: root/Lib/calendar.py
Commit message (Collapse)AuthorAgeFilesLines
* SF 685011: calendar module overflow handlingRaymond Hettinger2003-02-131-1/+1
| | | | | Restored a Py2.2 behavior to not range check the day of the month. A user application was this exploiting undocumented, accidental "feature".
* SF 658405: calendar.py to rely on the datetime module instead of the timeRaymond Hettinger2002-12-251-18/+8
| | | | | | | | | module. The code is shorter, more readable, faster, and dramatically increases the range of acceptable dates. Also, used the floor division operator in leapdays().
* Patches #626105:Raymond Hettinger2002-10-221-13/+6
| | | | | | | | | Replaces the _center function in the calendar module with the center method for strings. For situations with uneven padding, the behavior is slightly different in that the center method puts the extra space on the right instead of the left.
* Eliminate unused instance variableRaymond Hettinger2002-10-211-5/+5
|
* SF 570727 indexer() class no longer needed since lists now support slicingRaymond Hettinger2002-06-201-13/+4
|
* SF bug 533234: tm_isdst > 1 Passed to strftime.Tim Peters2002-03-231-18/+43
| | | | | | | | | | | One more time on this turkey, but duller instead of cleverer. Curious: The docs say __getslice__ has been deprecated since 2.0, but list.__getitem__ still doesn't work if you pass it a slice. This makes it a lot clearer to emulate a list by *being* a list <wink>. Bugfix candidate. Michael, just pile this patch on top of the others that went by -- no need to try to pick these apart.
* better solution for bug #533234 courtesy of Tim.Skip Montanaro2002-03-221-1/+2
| | | | Michael: use this version as the bugfix candidate...
* guarantee that the dst flag of synthetic "time" tuples passed to strftimeSkip Montanaro2002-03-221-1/+1
| | | | is always 0. This closes bug #533234.
* Corrected _localized_name.__getitem__ based on code in patch 503202 (which ISkip Montanaro2002-03-151-7/+9
| | | | | thought was just a bug report, so didn't notice - doh!). This handles slicing, which v 1.23 didn't.
* make _localized_name instances work more like the tuples they replaced. InSkip Montanaro2002-03-151-5/+12
| | | | | | particular, negative indexes work and they are limited by the actual length of the names they represent (weekday and month names). This closes bug #503202.
* Application of patch #401842 by Denis S. Otkidach to supportBarry Warsaw2001-05-221-9/+11
| | | | localization of month and day names.
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+4
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* Whitespace normalization.Tim Peters2001-01-141-3/+3
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-1/+1
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Fixed leapdays(). From Patch #101841, by Denis S. Otkidach.Guido van Rossum2000-10-091-2/+4
|
* patches from David Goodger. Closes patch 101085.Skip Montanaro2000-08-301-69/+104
| | | | | | | | | | * deletes cache * adds firstweekday and setfirstweekday functions that allow user to control which day of the week is first when displaying calendars * adds month, week, calendar functions that return their results instead of printing them * adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the ordinal values of the weekdays
* typos fixed by Rob HooftJeremy Hylton2000-06-281-1/+1
|
* Mass patch by Ka-Ping Yee:Guido van Rossum2000-02-021-118/+116
| | | | | | | | | | | 1. Comments at the beginning of the module, before functions, and before classes have been turned into docstrings. 2. Tabs are normalized to four spaces. Also, removed the "remove" function from dircmp.py, which reimplements list.remove() (it must have been very old).
* Add unrelated but handy function: timegm(), to calculate UnixGuido van Rossum1999-06-091-0/+17
| | | | timestamp from GMT tuple.
* No need to import gmtime, ctime, asctime.Guido van Rossum1999-05-031-2/+2
| | | | | Make error an alias for ValueError. (Andrew Dalke & kjpylint)
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-6/+1
|
* Some minute changes.Guido van Rossum1993-12-291-1/+0
|
* * calendar.py: all libC functionality now moved to built-in time moduleGuido van Rossum1993-06-231-27/+8
| | | | | | | * imghdr.py: added jpeg recognition * torgb.py: added jpeg conversion * tzparse.py: use functions from time instead of calendar * whatsound.py: add /ufs/guido/biin/sgi to $PATH when calling 'whatsound'
* * aifc.py: don't die on invalid MARK chunkGuido van Rossum1993-06-201-121/+81
| | | | | | | * calendar.py: remove stuff now built in time; some cleanup and generalization in the calendar printing * cmd.py: use __init__. * tzparse.py: This module is no longer necessary -- use builtin time instead!
* * calendar.py: minor cleanupsGuido van Rossum1993-06-171-4/+7
| | | | | * ftplib.py: support __init__ with optional host, port args * aifc.py: ensure header is written on close even when no data is written
* aiff.py, calendar.py: change functions taking a tuple to really take aGuido van Rossum1993-02-051-1/+2
| | | | tuple (now that it makes a difference to Python)
* * More changes due to stricter argument passing rulesGuido van Rossum1993-01-041-1/+2
| | | | | | * Fixed calendar.py, mimetools.py, whrandom.py to cope with time.time() returning a floating point number. (And fix old bug in calendar) * Add recursion level to mainloop.mainloop(), to make it reentrant.
* Misc changes and new modules. whrandom is "objectified". SOCKET.pyGuido van Rossum1992-10-181-4/+4
| | | | is moved to the sgi subdirectory.
* Changed calendar.py to define lists of literals instead of tuples.Guido van Rossum1992-07-091-9/+9
| | | | Got rid of old module 'localtime.py'.
* New == syntaxGuido van Rossum1992-01-011-4/+4
|
* Use IOError.Guido van Rossum1991-12-261-1/+1
|
* Initial revisionGuido van Rossum1990-10-131-0/+213