summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libdatetime.tex
Commit message (Collapse)AuthorAgeFilesLines
* lots of markup adjustmentsFred Drake2003-12-301-34/+43
|
* SF bug 799367: grammar errorRaymond Hettinger2003-09-061-1/+1
|
* Patch #792338: Correct documentation for timetuple return type.Martin v. Löwis2003-09-041-7/+7
|
* Zap the C API subsection altogether for now. It's not actually usable fromSkip Montanaro2003-07-161-58/+0
| | | | C yet anyway.
* expose the C API subsection which was hidden from LaTeX in a comment. InSkip Montanaro2003-07-161-22/+27
| | | | | | | | | | | the info conversion the \comment LaTeX macro mapped to a Texinfo @ignore macro. Unfortunately, py2texi.el is not smart enough to avoid generating links to the @ignore'd section, which causes makeinfo to croak. Exposing this text is probably not the most correct thing to do, as this documentation really belongs in the C API manual. This does get the info files generated, however, which is a more practical goal considering the impending release of 2.3rc1.
* Revert the previous change; this is now dealt with in a better way.Fred Drake2003-07-021-0/+54
|
* The datetime C API really isn't usable outside the datetime moduleFred Drake2003-07-021-54/+0
| | | | | implementation, so remove this decoy (it break formatting of the GNU info version of the docs).
* Fix missing parenthesis.Raymond Hettinger2003-05-101-1/+1
|
* Comparison for timedelta, time, date and datetime objects: __eq__ andTim Peters2003-02-071-1/+19
| | | | | | | | | | | | | | | | | __ne__ no longer complain if they don't know how to compare to the other thing. If no meaningful way to compare is known, saying "not equal" is sensible. This allows things like if adatetime in some_sequence: and somedict[adatetime] = whatever to work as expected even if some_sequence contains non-datetime objects, or somedict non-datetime keys, because they only call __eq__. It still complains (raises TypeError) for mixed-type comparisons in contexts that require a total ordering, such as list.sort(), use as a key in a BTree-based data structure, and cmp().
* Markup fixes; in particular, the tables are now reasonable widthAndrew M. Kuchling2003-02-051-104/+117
|
* Author markup: Andrew got to it firstRaymond Hettinger2003-01-301-1/+0
|
* Fix markupNeal Norwitz2003-01-251-1/+1
|
* date and datetime comparison: when we don't know how toTim Peters2003-01-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | compare against "the other" argument, we raise TypeError, in order to prevent comparison from falling back to the default (and worse than useless, in this case) comparison by object address. That's fine so far as it goes, but leaves no way for another date/datetime object to make itself comparable to our objects. For example, it leaves Marc-Andre no way to teach mxDateTime dates how to compare against Python dates. Discussion on Python-Dev raised a number of impractical ideas, and the simple one implemented here: when we don't know how to compare against "the other" argument, we raise TypeError *unless* the other object has a timetuple attr. In that case, we return NotImplemented instead, and Python will give the other object a shot at handling the comparison then. Note that comparisons of time and timedelta objects still suffer the original problem, though.
* SF bug 660872: datetimetz constructors behave counterintuitively (2.3a1).Tim Peters2003-01-231-10/+19
| | | | | | This gives much the same treatment to datetime.fromtimestamp(stamp, tz) as the last batch of checkins gave to datetime.now(tz): do "the obvious" thing with the tz argument instead of a senseless thing.
* Reimplemented datetime.now() to be useful.Tim Peters2003-01-231-8/+14
|
* "Premature" doc changes, for new astimezone() rules, and the newTim Peters2003-01-221-53/+157
| | | | | | | | | tzinfo.fromutc() method. The C code doesn't implement any of this yet (well, not the C code on the machine I'm using now), nor does the test suite reflect it. The Python datetime.py implementation and test suite in the sandbox do match these doc changes. The C implementation probably won't catch up before Thursday (Wednesday is a scheduled "black hole" day this week <0.4 wink>).
* SF bug 671779: Error in tzinfo.dst() docsTim Peters2003-01-211-2/+2
| | | | tzinfo dst() should return timedelta(0) if DST is not effect, not 0.
* New rule for tzinfo subclasses handling both standard and daylight time:Tim Peters2003-01-201-31/+37
| | | | | | | | | | | | When daylight time ends, an hour repeats on the local clock (for example, in US Eastern, the clock jumps from 1:59 back to 1:00 again). Times in the repeated hour are ambiguous. A tzinfo subclass that wants to play with astimezone() needs to treat times in the repeated hour as being standard time. astimezone() previously required that such times be treated as daylight time. There seems no killer argument either way, but Guido wants the standard-time version, and it does seem easier the new way to code both American (local-time based) and European (UTC-based) switch rules, and the astimezone() implementation is simpler.
* Various minor editsAndrew M. Kuchling2003-01-091-27/+30
|
* Markup fixAndrew M. Kuchling2003-01-091-0/+1
|
* Massive fiddling to reflect that datetimetz and timetz no longer exist.Tim Peters2003-01-091-556/+266
| | | | | | | | | | WARNING: It would be a minor miracle if the LaTeX stuff still worked. s/field/member/ generally everywhere, to conform with most other usage in the docs. s/daylight savings time/daylight saving time/ generally everywhere, because the latter spelling is anally correct.
* Fix markup so this will format again.Fred Drake2003-01-061-1/+1
|
* datetime_from_timet_and_us(): ignore leap seconds if the platformTim Peters2003-01-041-20/+34
| | | | | | | localtime()/gmtime() insists on delivering them, + associated doc changes. Redid the docs for datetimtez.astimezone().
* A new implementation of astimezone() that does what we agreed on in allTim Peters2003-01-041-5/+49
| | | | | | cases, plus even tougher tests of that. This implementation follows the correctness proof very closely, and should also be quicker (yes, I wrote the proof before the code, and the code proves the proof <wink>).
* The tzinfo methods utcoffset() and dst() must return a timedelta objectTim Peters2003-01-021-14/+15
| | | | | | (or None) now. In 2.3a1 they could also return an int or long, but that was an unhelpfully redundant leftover from an earlier version wherein they couldn't return a timedelta. TOOWTDI.
* astimezone() internals: if utcoffset() returns a duration, complain ifTim Peters2003-01-021-13/+19
| | | | dst() returns None (instead of treating that as 0).
* A quicker astimezone() implementation, rehabilitating an earlierTim Peters2003-01-011-6/+23
| | | | | | | | | | | | | | | | | | | suggestion from Guido, along with a formal correctness proof of the trickiest bit. The intricacy of the proof reveals how delicate this is, but also how robust the conclusion: correctness doesn't rely on dst() returning +- one hour (not all real time zones do!), it only relies on: 1. That dst() returns a (any) non-zero value if and only if daylight time is in effect. and 2. That the tzinfo subclass implements a consistent notion of time zone. The meaning of "consistent" was a hidden assumption, which is now an explicit requirement in the docs. Alas, it's an unverifiable (by the datetime implementation) requirement, but so it goes.
* - use classdesc where we can (for better indexing)Fred Drake2002-12-311-35/+42
| | | | - more style consistency crud
* General style conformance. Markup some unmarked constructs.Fred Drake2002-12-311-449/+478
|
* Use funcdesc instead of classdesc to be consistent with out sections.Raymond Hettinger2002-12-311-4/+4
|
* Spelling fixRaymond Hettinger2002-12-311-1/+1
|
* Add markup for time object.Raymond Hettinger2002-12-311-22/+23
| | | | | Cleanup whitespace. Fix unbalanced parenthesis.
* Removed the now-untrue (or soon-to-be untrue) part of the astimezone()Tim Peters2002-12-311-10/+7
| | | | | | | | docs. Replaced it with an XXX block, because the hoped-for treatment of DST endcases remains unclear (Guido doesn't really like raising an exception when it's impossible to deliver a correct result, but so far I have no way in hand to consistently deliver a defined incorrect result either).
* Complete the markup for timedelta objects.Raymond Hettinger2002-12-311-36/+28
| | | | Fix a curly brace that should have been a paren.
* Minor markup and spelling repair.Guido van Rossum2002-12-311-2/+3
|
* We're using strictly American spellings, so there's no diaresis overFred Drake2002-12-301-53/+56
| | | | | | the i in naive. More markup fixups.
* A step on the way to making tzinfo classes writable by mortals: get ridTim Peters2002-12-301-17/+37
| | | | | | | of the timetz case. A tzinfo method will always see a datetimetz arg, or None, now. In the former case, it's still possible that it will get a datetimetz argument belonging to a different timezone. That will get fixed next.
* Clean up a table so it passes formatting.Fred Drake2002-12-301-12/+19
|
* Added the \var{} markup so the tables will look good.Raymond Hettinger2002-12-301-8/+9
|
* Added markup upto line 233.Raymond Hettinger2002-12-301-58/+57
|
* More markup additionsAndrew M. Kuchling2002-12-301-156/+264
|
* Mark up more textAndrew M. Kuchling2002-12-301-117/+148
|
* astimezone(): document that None is an OK argument.Tim Peters2002-12-271-4/+5
|
* Make comparison and subtraction of aware objects ignore tzinfo if theTim Peters2002-12-271-23/+29
| | | | | | operands have identical tzinfo members (meaning object identity -- "is"). I misunderstood the intent here, reading wrong conclusion into conflicting clues.
* Implemented datetime.astimezone() and datetimetz.astimezone().Tim Peters2002-12-251-0/+22
|
* Removed blurb admonishing users to raise an exception if the datetimeTim Peters2002-12-241-2/+1
| | | | argument to a tzinfo method doesn't have a matching tzinfo member.
* Added note about technical pickle limitation on tzinfo instances.Tim Peters2002-12-241-1/+6
|
* tzinfo.{utcoffset,dst} can return timedelta (or integer or None).Tim Peters2002-12-241-15/+21
| | | | {timetz,datetimetz}.{uctcoffset,dst} do return timedelta (or None).
* Implemented .replace() methods for date, datetime, datetimetz, time andTim Peters2002-12-241-1/+28
| | | | timetz.
* Brought the strftime explanation into synch with the plain-text sandboxTim Peters2002-12-231-45/+56
| | | | | docs, and moved its section to the end (before the "C API" section, which latter doesn't really belong in the Library manual).