Commit Graph

169 Commits

Author SHA1 Message Date
Serhiy Storchaka ee1b01a41b Issue #21818: Fixed references to classes that have names matching with module
names.
2016-12-02 23:13:53 +02:00
Serhiy Storchaka b6a6b45458 Issue #21818: Fixed references to classes that have names matching with module
names.
2016-12-02 23:15:22 +02:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Alexander Belopolsky 53868aaabb Closes #27595: Document PEP 495 (Local Time Disambiguation) features. 2016-08-24 18:30:16 -04:00
Alexander Belopolsky 43746c3770 Closes #27661: Added tzinfo keyword argument to datetime.combine. 2016-08-02 17:49:30 -04:00
Terry Jan Reedy 4da945f361 Merge Issue #22558. 2016-06-11 15:06:08 -04:00
Terry Jan Reedy fa089b9b0b Issue #22558: Add remaining doc links to source code for Python-coded modules.
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Berker Peksag 94f89a6e02 Fix typos in datetime documentation. 2016-06-04 21:36:53 -07:00
Martin Panter f157982b2c Issue #27076: More doc and comment spelling fixes for 3.6, by Ville Skyttä 2016-05-26 06:03:33 +00:00
Serhiy Storchaka 1acbf853c8 Issue #26736: Used HTTPS for external links in the documentation if possible. 2016-05-07 10:49:58 +03:00
Serhiy Storchaka 6dff0205b7 Issue #26736: Used HTTPS for external links in the documentation if possible. 2016-05-07 10:49:07 +03:00
Berker Peksag 9fc385748c Issue #26957: Remove duplicate 'the' from datetime documentation
Patch by Alex Chan.
2016-05-04 23:26:04 +03:00
Berker Peksag bace976db1 Issue #26957: Remove duplicate 'the' from datetime documentation
Patch by Alex Chan.
2016-05-04 23:25:44 +03:00
Martin Panter 6b6abd4cf1 Issue #26678: Merge datetime doc fixes from 3.5 2016-04-01 23:20:52 +00:00
Martin Panter 16c7cfda7c Issue #26678: Fix indexing of datetime.tzinfo and timezone classes
Also fix links to the “tzinfo” class and attributes.
2016-04-01 21:48:24 +00:00
Alexander Belopolsky a2998a63c8 Closes #19475: Added timespec to the datetime.isoformat() method.
Added an optional argument timespec to the datetime isoformat() method
to choose the precision of the time component.

Original patch by Alessandro Cucci.
2016-03-06 14:58:43 -05:00
Martin Panter bc1ee460dc Issue #25179: Documentation for formatted string literals aka f-strings
Some of the inspiration and wording is taken from the text of PEP 498 by Eric
V. Smith, and the existing str.format() documentation.
2016-02-13 00:41:37 +00:00
Martin Panter 46988d3659 Merge string formatting doc fixes from 3.5 2016-02-08 01:49:35 +00:00
Martin Panter d5db14794b Issue #25179: Preparatory cleanup of existing docs on string formatting
* Various sections were pointing to the section on the string.Formatter
  class, when the section on the common format string syntax is probably more
  appropriate
* Fix references to various format() functions and methods
* Nested replacement fields may contain conversions and format specifiers,
  and this is tested; see Issue #19729 for instance
2016-02-08 01:34:09 +00:00
Alexander Belopolsky 68713e41a5 Closes issue #12006: Add ISO 8601 year, week, and day directives to strptime.
This commit adds %G, %V, and %u directives to strptime.  Thanks Ashley Anderson
for the implementation.
2015-10-06 13:29:56 -04:00
Berker Peksag df326eb1bb Fix versionchanged directive in datetime.rst 2015-09-09 18:32:50 +03:00
Alexander Belopolsky 7827a5b7c2 Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. 2015-09-06 13:07:21 -04:00
Benjamin Peterson 644adc6ada merge 3.4 (#24057) 2015-04-25 14:16:25 -04:00
Benjamin Peterson d87dd434c0 fix relative link (closes #24057) 2015-04-25 14:15:16 -04:00
Alexander Belopolsky e2e178e081 Closes issue #22791: Improved datetime from timestamp methods documentation.
Original patch by Akira Li.
2015-03-01 14:52:07 -05:00
Georg Brandl bad8d4bb53 merge with 3.4 2014-10-29 10:57:42 +01:00
Georg Brandl b7354a65ce Fixing broken links in doc, part 4: some more breaks and redirects 2014-10-29 10:57:37 +01:00
Georg Brandl cadc3fdcb5 Merge with 3.4 2014-10-29 08:37:29 +01:00
Georg Brandl e73778c1ac Use https:// URLs when referring to python.org hosts. 2014-10-29 08:36:35 +01:00
Benjamin Peterson 19db33fb08 merge 3.4 (#16667) 2014-06-22 16:27:10 -07:00
Benjamin Peterson 9b29acd1fe some timezone doc improvements (closes #16667)
From the combined efforts of Berber Peksage, Andrew Svetlov, and Yayoi Ukai.
2014-06-22 16:26:39 -07:00
Benjamin Peterson ee6bdc07d6 remove the ability of datetime.time to be considered false (closes #13936) 2014-03-20 18:00:35 -05:00
Andrew Kuchling 2e3743cd30 #13437: link to the source code for a few more modules 2014-03-19 16:23:01 -04:00
Georg Brandl 3a19a89eac merge with 3.3 2013-10-29 08:17:08 +01:00
Georg Brandl ad3215362c Fix typo: js_JP is not a valid locale. 2013-10-29 08:05:10 +01:00
Georg Brandl ef1605afa8 merge with 3.3 2013-10-13 18:38:53 +02:00
Georg Brandl b7117af07d Refer to strftime(3) manpage for platform specific format codes.
Suggested by Skip Montanaro on docs@.
2013-10-13 18:28:25 +02:00
David Wolever 5d07e70568 Remove errant fourth '.' from ellipsis in datetime documentation. 2013-08-14 14:41:48 -04:00
David Wolever e76c0393a8 Remove errant fourth '.' from ellipsis in datetime documentation. 2013-08-14 14:41:48 -04:00
David Wolever bbf4a46304 Merge issue #17701: Improving strftime documentation. 2013-08-12 17:15:36 -04:00
David Wolever 569a5faaea Issue #17701: Improving strftime documentation. 2013-08-12 16:56:02 -04:00
Alexander Belopolsky 790d269d39 Fixes #8860: Round half-microseconds to even in the timedelta constructor.
(Original patch by Mark Dickinson.)
2013-08-04 14:51:35 -04:00
Ezio Melotti 09f0ddec21 #8913: add examples and docs for date/time/datetime.__format__. Patch by Heikki Partanen. 2013-04-04 09:16:15 +03:00
Andrew Svetlov 2be0edb2c4 Fix typo 2012-12-17 13:42:40 +02:00
Andrew Svetlov dfe109e33f Fix typo 2012-12-17 13:42:04 +02:00
Senthil Kumaran 13c668229c issue13666 - merge from 3.2 2012-06-26 20:01:06 +08:00
Senthil Kumaran 72a80e85a8 issue13666 - Fixing datetime documentation example when using tzinfo 2012-06-26 20:00:15 +08:00
Georg Brandl ee0be40f29 Add yet another missing versionchanged. 2012-06-26 09:14:40 +02:00
Georg Brandl 217aa554fa Fix markup, for real this time. 2012-06-24 22:26:21 +02:00
Éric Araujo b0f0895849 Fix indentation 2012-06-24 16:22:09 -04:00
Alexander Belopolsky fdc860f310 Issue #9527: datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when
called with no arguments.
2012-06-22 12:23:23 -04:00
Alexander Belopolsky 0831382d69 Issue #15006: Allow equality comparison between naive and aware time
or datetime objects.
2012-06-15 20:19:47 -04:00
Alexander Belopolsky a4415141da Issue #2736: Added datetime.timestamp() method. 2012-06-08 12:33:09 -04:00
R David Murray d91dc62379 Merge #14766: Add correct algorithm for when a 'time' object is naive.
This patch also clarifies the definition of Naive and Aware.

Original patch by Greg Weller, I modified the first hunk
somewhat to make the exposition even clearer (I hope).
2012-05-14 22:19:10 -04:00
R David Murray 539f239e88 #14766: Reflow the altered paragraphs. 2012-05-14 22:17:23 -04:00
R David Murray 9075d8b771 #14766: Add correct algorithm for when a 'time' object is naive.
This patch also clarifies the definition of Naive and Aware.

Original patch by Greg Weller, I modified the first hunk
somewhat to make the exposition even clearer (I hope).
2012-05-14 22:14:46 -04:00
Sandro Tosi 4aff7ed332 Issue #14448: merge with 3.2 2012-04-28 11:19:59 +02:00
Sandro Tosi 100b889ccd Issue #14448: add reference to IANA timezone database; thanks to Georg/Nick suggestions 2012-04-28 11:19:37 +02:00
Sandro Tosi 17feca0efc Issue #14448: merge with 3.2 2012-04-24 19:46:29 +02:00
Sandro Tosi d11d0d6343 Issue #14448: mention pytz; patch by Andrew Svetlov 2012-04-24 19:46:06 +02:00
Victor Stinner ecc6e6613f Fix doc of datetime.date*.*fromtimestamp() methods 2012-03-14 00:39:29 +01:00
Victor Stinner 21f5893571 Issue #14180: datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp()
and datetime.datetime.utcfromtimestamp() now raise an OSError instead of
ValueError if localtime() or gmtime() failed.
2012-03-14 00:15:40 +01:00
Victor Stinner 5d272cc6a2 Close #14180: Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.

datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
2012-03-13 13:35:55 +01:00
Sandro Tosi b6dbc9ee15 merge with 3.2 2011-11-01 10:32:22 +01:00
Sandro Tosi 4bfe03a42e correct signature for tzinfo.dst() in examples; thanks to Daniil Shved from docs@ 2011-11-01 10:32:05 +01:00
Ezio Melotti 6fe679f011 #13076: merge with 3.2. 2011-10-02 12:47:10 +03:00
Ezio Melotti 35ec7f771b #13076: fix links to datetime.time and datetime.datetime. 2011-10-02 12:44:50 +03:00
Georg Brandl 902e895578 merge doc fixes from 3.2 2011-09-17 20:40:35 +02:00
Georg Brandl 755460694e Fix typo. 2011-09-17 20:20:04 +02:00
Senthil Kumaran 42d1320c06 merge from 3.2 2011-07-17 19:06:03 +08:00
Senthil Kumaran 023c6f703d Fix Issue10403 - datetime documentation clarification based on review in the reitveld by Alexendar belopolsky. 2011-07-17 19:01:14 +08:00
Senthil Kumaran 8fbfc12f5e merge from 3.2 2011-07-04 11:44:17 -07:00
Senthil Kumaran 3aac179498 Fix whitespace nit in datetime and os rst files. 2011-07-04 11:43:51 -07:00
Senthil Kumaran 276a58b821 Merge from 3.2 . Replace the term members with correct and appropriate terminology. Initial patch by Adam Woodbeck. 2011-07-04 11:31:53 -07:00
Senthil Kumaran a6bac95a3c issue10403 - Let's not use members anymore. Use 'attribute' where it denotes attribute and 'methods' where it denotes methods. Context should clarify usage. 2011-07-04 11:28:30 -07:00
Alexander Belopolsky 6d3c9a6893 Mention that timezone is a subclass of tzinfo. 2011-05-04 10:28:26 -04:00
Alexander Belopolsky 5611a1c326 Issue #11930: Added Misc/NEWS and versionchanged entries. 2011-05-02 14:14:48 -04:00
Alexander Belopolsky 89da349b7b Issue #11930: Remove year >= 1000 limitation from datetime.strftime.
Patch by Victor Stinner.
2011-05-02 13:14:24 -04:00
Alexander Belopolsky 54afa5504c Issue #2736: Documented how to compute seconds since epoch. 2011-04-25 13:00:40 -04:00
Alexander Belopolsky 5fc850b455 Improved footnote for the %Y directive slightly. 2011-01-10 23:31:51 +00:00
Alexander Belopolsky 085556ae89 Improved description of %Y directive. 2011-01-10 23:28:33 +00:00
Alexander Belopolsky 9971e001ef Issue #2568: Removed bogus rationale for supporting tm_sec=61. 2011-01-10 22:56:14 +00:00
Alexander Belopolsky 2997837158 Fixed documentation to reflect recent changes for years < 1900. 2011-01-08 20:47:21 +00:00
Georg Brandl 682d7e0e07 Fix errors found by "make suspicious". 2010-10-06 10:26:05 +00:00
Georg Brandl 60203b41b0 Migrate to Sphinx 1.0 C language constructs. 2010-10-06 10:11:56 +00:00
Georg Brandl 67b21b7547 Consistency check for versionadded/changed directives. 2010-08-17 15:07:14 +00:00
Georg Brandl f55c31594b #9430: document timedelta str() and repr(). 2010-07-31 11:40:07 +00:00
Alexander Belopolsky 75f94c210a Issue #9005: Prevent utctimetuple() from producing year 0 or year 10,000. 2010-06-21 15:21:14 +00:00
Alexander Belopolsky 49d7a57f33 Added a new line at the end of the file. 2010-06-18 16:57:49 +00:00
Alexander Belopolsky ca94f55758 Issue #6641: The datetime.strptime method now supports the %z directive. 2010-06-17 18:30:34 +00:00
Alexander Belopolsky b39a0c242d Issue 5094: minor documentation fixes 2010-06-15 19:24:52 +00:00
Alexander Belopolsky 4e749a1113 Issue #5094: The ``datetime`` module now has a simple concrete class
implementing ``datetime.tzinfo`` interface.
2010-06-14 14:15:50 +00:00
Alexander Belopolsky da62f2fe28 Merged revisions 81864 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81864 | alexander.belopolsky | 2010-06-09 13:08:11 -0400 (Wed, 09 Jun 2010) | 1 line

  Fixed markup of tm_isdst attribute.
........
2010-06-09 17:11:01 +00:00
Alexander Belopolsky 649124856a Merged revisions 81489 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81489 | georg.brandl | 2010-05-23 17:29:29 -0400 (Sun, 23 May 2010) | 1 line

  #1436346: make it more obvious that timetuple[7] is yday.
........
2010-06-08 18:59:20 +00:00
Alexander Belopolsky 1790bc43bf Issue #1289118: datetime.timedelta objects can now be multiplied by float
and divided by float and int objects.
2010-05-31 17:33:47 +00:00
Mark Dickinson 0381e3f16a Issue #8644: Improve accuracy of timedelta.total_seconds, by doing intermediate
computations with integer arithmetic instead of floating point.
td.total_seconds() now agrees with td / timedelta(seconds = 1).

Thanks Alexander Belopolsky for the patch.
2010-05-08 14:35:02 +00:00
Mark Dickinson 7c186e2a18 Issue #2706: Add support for dividing a timedelta by another timedelta.
Adds support for the three division operations:

  - timedelta / timedelta -> float
  - timedelta // timedelta -> int
  - timedelta % timedelta -> timedelta

also adds support for divmod(timedelta, timedelta).

Patch by Victor Stinner, adapted for py3k and extended by Alexander
Belopolsky.
2010-04-20 22:32:49 +00:00
Georg Brandl 7bc6e4fd06 Merged revisions 79184-79185 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79184 | georg.brandl | 2010-03-21 10:58:36 +0100 (So, 21 Mär 2010) | 1 line

  Update text for newest US DST regulation.  The sample file already has the calculation right.
........
  r79185 | georg.brandl | 2010-03-21 11:02:47 +0100 (So, 21 Mär 2010) | 1 line

  Include structmember.h correctly.
........
2010-03-21 10:03:36 +00:00
Benjamin Peterson 5e55b3e204 Merged revisions 77484,77487,77561,77570,77593,77603,77608,77667,77702-77703,77739,77858,77887,77889 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77484 | skip.montanaro | 2010-01-13 19:12:34 -0600 (Wed, 13 Jan 2010) | 4 lines

  Update PyEval_EvalFrame to PyEval_EvalFrameEx.  This looks to have been done
  partially before.  Also add a comment describing how this might have to work
  with different versions of the interpreter.
........
  r77487 | ezio.melotti | 2010-01-14 05:34:10 -0600 (Thu, 14 Jan 2010) | 1 line

  Fixed typo
........
  r77561 | georg.brandl | 2010-01-17 02:42:30 -0600 (Sun, 17 Jan 2010) | 1 line

  #7699: improve datetime docs: straightforward linking to strftime/strptime section, mark classmethods as such.
........
  r77570 | georg.brandl | 2010-01-17 06:14:42 -0600 (Sun, 17 Jan 2010) | 1 line

  Add note about usage of STRINGLIB_EMPTY.
........
  r77593 | georg.brandl | 2010-01-17 17:33:53 -0600 (Sun, 17 Jan 2010) | 1 line

  Fix internal reference.
........
  r77603 | benjamin.peterson | 2010-01-18 17:07:56 -0600 (Mon, 18 Jan 2010) | 8 lines

  data descriptors do not override the class dictionary if __get__ is not defined

  Adjust documentation and add a test to verify this behavior.

  See http://mail.python.org/pipermail/python-dev/2010-January/095637.html for
  discussion.
........
  r77608 | gregory.p.smith | 2010-01-19 02:19:03 -0600 (Tue, 19 Jan 2010) | 6 lines

  Do not compile stubs for the sha2 series hashes in the openssl hashlib
  module when the openssl version is too old to support them.  That
  leads both compiled code bloat and to unittests attempting to test
  implementations that don't exist for comparison purposes on such
  platforms.
........
  r77667 | mark.dickinson | 2010-01-21 12:32:27 -0600 (Thu, 21 Jan 2010) | 1 line

  Add two more test_strtod test values.
........
  r77702 | georg.brandl | 2010-01-23 02:43:31 -0600 (Sat, 23 Jan 2010) | 1 line

  #7762: fix refcount annotation of PyUnicode_Tailmatch().
........
  r77703 | georg.brandl | 2010-01-23 02:47:54 -0600 (Sat, 23 Jan 2010) | 1 line

  #7725: fix referencing issue.
........
  r77739 | benjamin.peterson | 2010-01-24 21:52:52 -0600 (Sun, 24 Jan 2010) | 1 line

  mention from_float() in error message
........
  r77858 | georg.brandl | 2010-01-30 11:57:48 -0600 (Sat, 30 Jan 2010) | 1 line

  #7802: fix invalid example (heh).
........
  r77887 | georg.brandl | 2010-01-31 12:51:49 -0600 (Sun, 31 Jan 2010) | 5 lines

  Fix-up ftplib documentation:
  move exception descriptions to toplevel, not inside a class
  remove attribution in "versionadded"
  spell and grammar check docstring of FTP_TLS
........
  r77889 | michael.foord | 2010-01-31 13:59:26 -0600 (Sun, 31 Jan 2010) | 1 line

  Minor modification to unittest documentation.
........
2010-02-03 02:35:45 +00:00
Antoine Pitrou be6859d877 Merged revisions 76529 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76529 | antoine.pitrou | 2009-11-25 23:59:36 +0100 (mer., 25 nov. 2009) | 4 lines

  Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method returning
  the total number of seconds in the duration.  Patch by Brian Quinlan.
........
2009-11-25 23:02:32 +00:00