# Copyright (C) 2001-2020, Python Software Foundation # This file is distributed under the same license as the Python package. # Maintained by the python-doc-es workteam. # docs-es@python.org / # https://mail.python.org/mailman3/lists/docs-es.python.org/ # Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-25 19:47+0200\n" "PO-Revision-Date: 2021-08-07 16:13+0200\n" "Last-Translator: Cristián Maureira-Fredes \n" "Language: es_ES\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" #: ../Doc/library/datetime.rst:2 msgid ":mod:`datetime` --- Basic date and time types" msgstr ":mod:`datetime` --- Tipos básicos de fecha y hora" #: ../Doc/library/datetime.rst:11 msgid "**Source code:** :source:`Lib/datetime.py`" msgstr "**Código fuente:** :source:`Lib/datetime.py`" #: ../Doc/library/datetime.rst:17 msgid "" "The :mod:`datetime` module supplies classes for manipulating dates and times." msgstr "" "El módulo :mod:`datetime` proporciona clases para manipular fechas y horas." #: ../Doc/library/datetime.rst:19 msgid "" "While date and time arithmetic is supported, the focus of the implementation " "is on efficient attribute extraction for output formatting and manipulation." msgstr "" "Si bien la implementación permite operaciones aritméticas con fechas y " "horas, su principal objetivo es poder extraer campos de forma eficiente para " "su posterior manipulación o formateo." #: ../Doc/library/datetime.rst:25 msgid "Module :mod:`calendar`" msgstr "Módulo :mod:`calendar`" #: ../Doc/library/datetime.rst:25 msgid "General calendar related functions." msgstr "Funciones generales relacionadas a *calendar*." #: ../Doc/library/datetime.rst:28 msgid "Module :mod:`time`" msgstr "Módulo :mod:`time`" #: ../Doc/library/datetime.rst:28 msgid "Time access and conversions." msgstr "Acceso a tiempo y conversiones." #: ../Doc/library/datetime.rst:31 #, fuzzy msgid "Module :mod:`zoneinfo`" msgstr "Módulo :mod:`time`" #: ../Doc/library/datetime.rst:31 msgid "Concrete time zones representing the IANA time zone database." msgstr "" #: ../Doc/library/datetime.rst:33 msgid "Package `dateutil `_" msgstr "Paquete `dateutil `_" #: ../Doc/library/datetime.rst:34 msgid "Third-party library with expanded time zone and parsing support." msgstr "" "Biblioteca de terceros con zona horaria ampliada y soporte de análisis." #: ../Doc/library/datetime.rst:39 msgid "Aware and Naive Objects" msgstr "Objetos conscientes (*aware*) y naífs (*naive*)" #: ../Doc/library/datetime.rst:41 msgid "" "Date and time objects may be categorized as \"aware\" or \"naive\" depending " "on whether or not they include timezone information." msgstr "" "Los objetos de fecha y hora pueden clasificarse como conscientes (*aware*) o " "naífs (*naive*) dependiendo de si incluyen o no información de zona horaria." #: ../Doc/library/datetime.rst:44 msgid "" "With sufficient knowledge of applicable algorithmic and political time " "adjustments, such as time zone and daylight saving time information, an " "**aware** object can locate itself relative to other aware objects. An aware " "object represents a specific moment in time that is not open to " "interpretation. [#]_" msgstr "" "Con suficiente conocimiento de los ajustes de tiempo políticos y " "algorítmicos aplicables, como la zona horaria y la información del horario " "de verano, un objeto **consciente** puede ubicarse en relación con otros " "objetos conscientes. Un objeto consciente representa un momento específico " "en el tiempo que no está abierto a interpretación. [#]_" #: ../Doc/library/datetime.rst:50 msgid "" "A **naive** object does not contain enough information to unambiguously " "locate itself relative to other date/time objects. Whether a naive object " "represents Coordinated Universal Time (UTC), local time, or time in some " "other timezone is purely up to the program, just like it is up to the " "program whether a particular number represents metres, miles, or mass. Naive " "objects are easy to understand and to work with, at the cost of ignoring " "some aspects of reality." msgstr "" "Un objeto **ingenuo** no contiene suficiente información para ubicarse sin " "ambigüedades en relación con otros objetos de fecha/hora. Si un objeto " "ingenuo representa la hora universal coordinada (UTC), la hora local o la " "hora en alguna otra zona horaria depende exclusivamente del programa, al " "igual que depende del programa si un número en particular representa metros, " "millas o masa. Los objetos ingenuos son fáciles de entender y trabajar con " "ellos, a costa de ignorar algunos aspectos de la realidad." #: ../Doc/library/datetime.rst:57 msgid "" "For applications requiring aware objects, :class:`.datetime` and :class:`." "time` objects have an optional time zone information attribute, :attr:`!" "tzinfo`, that can be set to an instance of a subclass of the abstract :class:" "`tzinfo` class. These :class:`tzinfo` objects capture information about the " "offset from UTC time, the time zone name, and whether daylight saving time " "is in effect." msgstr "" "Para las aplicaciones que requieren objetos conscientes, los objetos :class:" "`.datetime` y :class:`.time` tienen un atributo de información de zona " "horaria opcional, :attr:`!tzinfo`, que se puede establecer en una instancia " "de una subclase de la clase abstracta :class:`tzinfo`. Estos objetos :class:" "`tzinfo` capturan información sobre el desplazamiento de la hora UTC, el " "nombre de la zona horaria y si el horario de verano está en vigor." #: ../Doc/library/datetime.rst:63 msgid "" "Only one concrete :class:`tzinfo` class, the :class:`timezone` class, is " "supplied by the :mod:`datetime` module. The :class:`timezone` class can " "represent simple timezones with fixed offsets from UTC, such as UTC itself " "or North American EST and EDT timezones. Supporting timezones at deeper " "levels of detail is up to the application. The rules for time adjustment " "across the world are more political than rational, change frequently, and " "there is no standard suitable for every application aside from UTC." msgstr "" "El módulo :mod:`datetime` solo proporciona una clase concreta :class:" "`tzinfo`, la clase :class:`timezone`. La clase :class:`timezone` puede " "representar zonas horarias simples con desplazamientos fijos desde UTC, como " "UTC o las zonas horarias EST y EDT de América del Norte. La compatibilidad " "de zonas horarias con niveles de detalle más profundos depende de la " "aplicación. Las reglas para el ajuste del tiempo en todo el mundo son mas " "políticas que racionales, cambian con frecuencia y no existe un estándar " "adecuado para cada aplicación, aparte de UTC." #: ../Doc/library/datetime.rst:72 msgid "Constants" msgstr "Constantes" #: ../Doc/library/datetime.rst:74 msgid "The :mod:`datetime` module exports the following constants:" msgstr "El módulo :mod:`datetime` exporta las siguientes constantes:" #: ../Doc/library/datetime.rst:78 msgid "" "The smallest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MINYEAR` is ``1``." msgstr "" "El número de año más pequeño permitido en un objeto :class:`date` o :class:`." "datetime`. :const:`MINYEAR` es` `1``." #: ../Doc/library/datetime.rst:84 msgid "" "The largest year number allowed in a :class:`date` or :class:`.datetime` " "object. :const:`MAXYEAR` is ``9999``." msgstr "" "El número de año más grande permitido en un objeto :class:`date` o en :class:" "`.datetime`:const:`MAXYEAR` es` `9999``." #: ../Doc/library/datetime.rst:89 msgid "Alias for the UTC timezone singleton :attr:`datetime.timezone.utc`." msgstr "" #: ../Doc/library/datetime.rst:94 msgid "Available Types" msgstr "Tipos disponibles" #: ../Doc/library/datetime.rst:99 msgid "" "An idealized naive date, assuming the current Gregorian calendar always was, " "and always will be, in effect. Attributes: :attr:`year`, :attr:`month`, and :" "attr:`day`." msgstr "" "Una fecha naíf (*naive*) idealizada, suponiendo que el calendario gregoriano " "actual siempre estuvo, y siempre estará, vigente. Atributos: :attr:`year`, :" "attr:`month`, y :attr:`day`." #: ../Doc/library/datetime.rst:107 msgid "" "An idealized time, independent of any particular day, assuming that every " "day has exactly 24\\*60\\*60 seconds. (There is no notion of \"leap " "seconds\" here.) Attributes: :attr:`hour`, :attr:`minute`, :attr:`second`, :" "attr:`microsecond`, and :attr:`.tzinfo`." msgstr "" "Un tiempo idealizado, independiente de cualquier día en particular, " "suponiendo que cada día tenga exactamente 24\\* 60\\* 60 segundos. (Aquí no " "hay noción de \"segundos intercalares\".) \n" "Atributos: :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" "`microsecond`, y :attr:`.tzinfo`." #: ../Doc/library/datetime.rst:116 msgid "" "A combination of a date and a time. Attributes: :attr:`year`, :attr:" "`month`, :attr:`day`, :attr:`hour`, :attr:`minute`, :attr:`second`, :attr:" "`microsecond`, and :attr:`.tzinfo`." msgstr "" "Una combinación de una fecha y una hora. \n" "Atributos: :attr:`year`, :attr:`month`, :attr:`day`, :attr:`hour`, :attr:" "`minute`, :attr:`second`, :attr:`microsecond` , y :attr:`.tzinfo`." #: ../Doc/library/datetime.rst:124 msgid "" "A duration expressing the difference between two :class:`date`, :class:`." "time`, or :class:`.datetime` instances to microsecond resolution." msgstr "" "Una duración que expresa la diferencia entre dos instancias :class:`date`, :" "class:`.time` o :class:`.datetime` a una resolución de microsegundos." #: ../Doc/library/datetime.rst:131 msgid "" "An abstract base class for time zone information objects. These are used by " "the :class:`.datetime` and :class:`.time` classes to provide a customizable " "notion of time adjustment (for example, to account for time zone and/or " "daylight saving time)." msgstr "" "Una clase base abstracta para objetos de información de zona horaria. Estos " "son utilizados por las clases :class:`.datetime` y :class:`.time` para " "proporcionar una noción personalizable de ajuste de hora (por ejemplo, para " "tener en cuenta la zona horaria y / o el horario de verano)." #: ../Doc/library/datetime.rst:139 msgid "" "A class that implements the :class:`tzinfo` abstract base class as a fixed " "offset from the UTC." msgstr "" "Una clase que implementa la clase de base abstracta :class:`tzinfo` como un " "desplazamiento fijo desde el UTC." #: ../Doc/library/datetime.rst:144 ../Doc/library/datetime.rst:162 msgid "Objects of these types are immutable." msgstr "Los objetos de este tipo son inmutables." #: ../Doc/library/datetime.rst:146 msgid "Subclass relationships::" msgstr "Relaciones de subclase::" #: ../Doc/library/datetime.rst:157 msgid "Common Properties" msgstr "Propiedades comunes" #: ../Doc/library/datetime.rst:159 msgid "" "The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` " "types share these common features:" msgstr "" "Las clases :class:`date`, :class:`.datetime`, :class:`.time`, y :class:" "`timezone` comparten estas características comunes:" #: ../Doc/library/datetime.rst:163 msgid "" "Objects of these types are hashable, meaning that they can be used as " "dictionary keys." msgstr "" "Los objetos de este tipo son *hashable*, lo que significa que pueden usarse " "como claves de diccionario." #: ../Doc/library/datetime.rst:165 msgid "" "Objects of these types support efficient pickling via the :mod:`pickle` " "module." msgstr "" "Los objetos de este tipo admiten el *pickling* eficiente a través del " "módulo :mod:`pickle`." #: ../Doc/library/datetime.rst:168 msgid "Determining if an Object is Aware or Naive" msgstr "Determinando si un objeto es Consciente (*Aware*) o Naíf (*Naive*)" #: ../Doc/library/datetime.rst:170 msgid "Objects of the :class:`date` type are always naive." msgstr "Los objetos del tipo :class:`date` son siempre naíf (*naive*)." #: ../Doc/library/datetime.rst:172 msgid "" "An object of type :class:`.time` or :class:`.datetime` may be aware or naive." msgstr "" "Un objeto de tipo :class:`.time` o :class:`.datetime` puede ser consciente " "(*aware*) o naíf (*naive*)." #: ../Doc/library/datetime.rst:174 msgid "A :class:`.datetime` object *d* is aware if both of the following hold:" msgstr "" "Un objeto :class:`.datetime` *d* es consciente si se cumplen los dos " "siguientes:" #: ../Doc/library/datetime.rst:176 msgid "``d.tzinfo`` is not ``None``" msgstr "``d.tzinfo`` no es ``None``" #: ../Doc/library/datetime.rst:177 msgid "``d.tzinfo.utcoffset(d)`` does not return ``None``" msgstr "``d.tzinfo.utcoffset(d)`` no retorna ``None``" #: ../Doc/library/datetime.rst:179 msgid "Otherwise, *d* is naive." msgstr "De lo contrario, *d* es naíf (*naive*)." #: ../Doc/library/datetime.rst:181 msgid "A :class:`.time` object *t* is aware if both of the following hold:" msgstr "" "A :class:`.time` object *t* es consciente si ambos de los siguientes se " "mantienen:" #: ../Doc/library/datetime.rst:183 msgid "``t.tzinfo`` is not ``None``" msgstr "``t.tzinfo`` no es ``None``" #: ../Doc/library/datetime.rst:184 msgid "``t.tzinfo.utcoffset(None)`` does not return ``None``." msgstr "``t.tzinfo.utcoffset(None)`` no retorna ``None``." #: ../Doc/library/datetime.rst:186 msgid "Otherwise, *t* is naive." msgstr "De lo contrario, *t* es naíf (*naive*)." #: ../Doc/library/datetime.rst:188 msgid "" "The distinction between aware and naive doesn't apply to :class:`timedelta` " "objects." msgstr "" "La distinción entre los objetos consciente (*aware*) y naíf (*naive*) no se " "aplica a :class:`timedelta`." #: ../Doc/library/datetime.rst:194 msgid ":class:`timedelta` Objects" msgstr "Objetos :class:`timedelta`" #: ../Doc/library/datetime.rst:196 msgid "" "A :class:`timedelta` object represents a duration, the difference between " "two dates or times." msgstr "" "El objeto :class:`timedelta` representa una duración, la diferencia entre " "dos fechas u horas." #: ../Doc/library/datetime.rst:201 msgid "" "All arguments are optional and default to ``0``. Arguments may be integers " "or floats, and may be positive or negative." msgstr "" "Todos los argumentos son opcionales y predeterminados a ``0``. Los " "argumentos pueden ser enteros o flotantes, y pueden ser positivos o " "negativos." #: ../Doc/library/datetime.rst:204 msgid "" "Only *days*, *seconds* and *microseconds* are stored internally. Arguments " "are converted to those units:" msgstr "" "Solo *days*, *seconds* y *microseconds* se almacenan internamente. Los " "argumentos se convierten a esas unidades:" #: ../Doc/library/datetime.rst:207 msgid "A millisecond is converted to 1000 microseconds." msgstr "Un milisegundo se convierte a 1000 microsegundos." #: ../Doc/library/datetime.rst:208 msgid "A minute is converted to 60 seconds." msgstr "Un minuto se convierte a 60 segundos." #: ../Doc/library/datetime.rst:209 msgid "An hour is converted to 3600 seconds." msgstr "Una hora se convierte a 3600 segundos." #: ../Doc/library/datetime.rst:210 msgid "A week is converted to 7 days." msgstr "Una semana se convierte a 7 días." #: ../Doc/library/datetime.rst:212 msgid "" "and days, seconds and microseconds are then normalized so that the " "representation is unique, with" msgstr "" "y los días, segundos y microsegundos se normalizan para que la " "representación sea única, con" #: ../Doc/library/datetime.rst:215 msgid "``0 <= microseconds < 1000000``" msgstr "``0 <= microsegundos < 1000000``" #: ../Doc/library/datetime.rst:216 msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)" msgstr "``0 <= segundos< 3600*24`` (el número de segundos en un día)" #: ../Doc/library/datetime.rst:217 msgid "``-999999999 <= days <= 999999999``" msgstr "``-999999999 <= days <= 999999999``" #: ../Doc/library/datetime.rst:219 msgid "" "The following example illustrates how any arguments besides *days*, " "*seconds* and *microseconds* are \"merged\" and normalized into those three " "resulting attributes::" msgstr "" "El siguiente ejemplo ilustra cómo cualquier argumento además de *days*, " "*seconds* y *microseconds* se \"fusionan\" y normalizan en esos tres " "atributos resultantes::" #: ../Doc/library/datetime.rst:237 msgid "" "If any argument is a float and there are fractional microseconds, the " "fractional microseconds left over from all arguments are combined and their " "sum is rounded to the nearest microsecond using round-half-to-even " "tiebreaker. If no argument is a float, the conversion and normalization " "processes are exact (no information is lost)." msgstr "" "Si algún argumento es flotante y hay microsegundos fraccionarios, los " "microsegundos fraccionarios que quedan de todos los argumentos se combinan y " "su suma se redondea al microsegundo más cercano utilizando el desempate de " "medio redondeo a par. Si ningún argumento es flotante, los procesos de " "conversión y normalización son exactos (no se pierde información)." #: ../Doc/library/datetime.rst:244 msgid "" "If the normalized value of days lies outside the indicated range, :exc:" "`OverflowError` is raised." msgstr "" "Si el valor normalizado de los días se encuentra fuera del rango indicado, " "se lanza :exc:`OverflowError`." #: ../Doc/library/datetime.rst:247 msgid "" "Note that normalization of negative values may be surprising at first. For " "example::" msgstr "" "Tenga en cuenta que la normalización de los valores negativos puede ser " "sorprendente al principio. Por ejemplo::" #: ../Doc/library/datetime.rst:256 ../Doc/library/datetime.rst:552 #: ../Doc/library/datetime.rst:1059 ../Doc/library/datetime.rst:1677 #: ../Doc/library/datetime.rst:2281 msgid "Class attributes:" msgstr "Atributos de clase:" #: ../Doc/library/datetime.rst:260 msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``." msgstr "" "El objeto más negativo en :class:`timedelta`, ``timedelta(-999999999)``." #: ../Doc/library/datetime.rst:265 msgid "" "The most positive :class:`timedelta` object, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." msgstr "" "El objeto más positivo de la :class:`timedelta`, ``timedelta(days=999999999, " "hours=23, minutes=59, seconds=59, microseconds=999999)``." #: ../Doc/library/datetime.rst:271 msgid "" "The smallest possible difference between non-equal :class:`timedelta` " "objects, ``timedelta(microseconds=1)``." msgstr "" "La diferencia más pequeña posible entre los objetos no iguales :class:" "`timedelta` ``timedelta(microseconds=1)``." #: ../Doc/library/datetime.rst:274 msgid "" "Note that, because of normalization, ``timedelta.max`` > ``-timedelta.min``. " "``-timedelta.max`` is not representable as a :class:`timedelta` object." msgstr "" "Tenga en cuenta que, debido a la normalización, ``timedelta.max``> ``-" "timedelta.min``. ``-timedelta.max`` no es representable como un objeto :" "class:`timedelta`." #: ../Doc/library/datetime.rst:277 ../Doc/library/datetime.rst:570 #: ../Doc/library/datetime.rst:1079 ../Doc/library/datetime.rst:1697 msgid "Instance attributes (read-only):" msgstr "Atributos de instancia (solo lectura):" #: ../Doc/library/datetime.rst:280 msgid "Attribute" msgstr "Atributo" #: ../Doc/library/datetime.rst:280 msgid "Value" msgstr "Valor" #: ../Doc/library/datetime.rst:282 msgid "``days``" msgstr "``days``" #: ../Doc/library/datetime.rst:282 msgid "Between -999999999 and 999999999 inclusive" msgstr "Entre -999999999 y 999999999 inclusive" #: ../Doc/library/datetime.rst:284 msgid "``seconds``" msgstr "``seconds``" #: ../Doc/library/datetime.rst:284 msgid "Between 0 and 86399 inclusive" msgstr "Entre 0 y 86399 inclusive" #: ../Doc/library/datetime.rst:286 msgid "``microseconds``" msgstr "``microseconds``" #: ../Doc/library/datetime.rst:286 msgid "Between 0 and 999999 inclusive" msgstr "Entre 0 y 999999 inclusive" #: ../Doc/library/datetime.rst:289 ../Doc/library/datetime.rst:587 #: ../Doc/library/datetime.rst:1132 msgid "Supported operations:" msgstr "Operaciones soportadas:" #: ../Doc/library/datetime.rst:294 ../Doc/library/datetime.rst:590 #: ../Doc/library/datetime.rst:1135 msgid "Operation" msgstr "Operación" #: ../Doc/library/datetime.rst:294 ../Doc/library/datetime.rst:590 #: ../Doc/library/datetime.rst:1135 msgid "Result" msgstr "Resultado" #: ../Doc/library/datetime.rst:296 msgid "``t1 = t2 + t3``" msgstr "``t1 = t2 + t3``" #: ../Doc/library/datetime.rst:296 msgid "" "Sum of *t2* and *t3*. Afterwards *t1*-*t2* == *t3* and *t1*-*t3* == *t2* are " "true. (1)" msgstr "" "Suma de *t2* y *t3*. Después *t1*-*t2* == *t3* y *t1*-*t3* == *t2* son " "verdaderos. (1)" #: ../Doc/library/datetime.rst:299 msgid "``t1 = t2 - t3``" msgstr "``t1 = t2 - t3``" #: ../Doc/library/datetime.rst:299 msgid "" "Difference of *t2* and *t3*. Afterwards *t1* == *t2* - *t3* and *t2* == *t1* " "+ *t3* are true. (1)(6)" msgstr "" "La suma de *t2* y *t3*. Después *t1* == *t2* - *t3* y *t2* == *t1* + *t3* " "son verdaderos. (1)(6)" #: ../Doc/library/datetime.rst:303 msgid "``t1 = t2 * i or t1 = i * t2``" msgstr "``t1 = t2 * i o t1 = i * t2``" #: ../Doc/library/datetime.rst:303 msgid "" "Delta multiplied by an integer. Afterwards *t1* // i == *t2* is true, " "provided ``i != 0``." msgstr "" "Delta multiplicado por un entero. Después *t1* // i == *t2* es verdadero, " "siempre que ``i != 0``." #: ../Doc/library/datetime.rst:307 msgid "In general, *t1* \\* i == *t1* \\* (i-1) + *t1* is true. (1)" msgstr "En general, *t1* \\* *i* == *t1* \\* (*i*-1) + *t1* es verdadero. (1)" #: ../Doc/library/datetime.rst:310 msgid "``t1 = t2 * f or t1 = f * t2``" msgstr "``t1 = t2 * f o t1 = f * t2``" #: ../Doc/library/datetime.rst:310 msgid "" "Delta multiplied by a float. The result is rounded to the nearest multiple " "of timedelta.resolution using round-half-to-even." msgstr "" "Delta multiplicado por un número decimal. El resultado se redondea al " "múltiplo mas cercano de *timedelta.resolution* usando redondeo de medio a " "par." #: ../Doc/library/datetime.rst:314 msgid "``f = t2 / t3``" msgstr "``f = t2 / t3``" #: ../Doc/library/datetime.rst:314 msgid "" "Division (3) of overall duration *t2* by interval unit *t3*. Returns a :" "class:`float` object." msgstr "" "División (3) de la duración total *t2* por unidad de intervalo *t3*. Retorna " "un objeto :class:`float`." #: ../Doc/library/datetime.rst:318 msgid "``t1 = t2 / f or t1 = t2 / i``" msgstr "``t1 = t2 / f o t1 = t2 / i``" #: ../Doc/library/datetime.rst:318 msgid "" "Delta divided by a float or an int. The result is rounded to the nearest " "multiple of timedelta.resolution using round-half-to-even." msgstr "" "Delta dividido por un número decimal o un entero. El resultado se redondea " "al múltiplo más cercano de *timedelta.resolution* usando redondeo de medio a " "par." #: ../Doc/library/datetime.rst:322 msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``" msgstr "``t1 = t2 // i`` o ``t1 = t2 // t3``" #: ../Doc/library/datetime.rst:322 msgid "" "The floor is computed and the remainder (if any) is thrown away. In the " "second case, an integer is returned. (3)" msgstr "" "El piso (*floor*) se calcula y el resto (si lo hay) se descarta. En el " "segundo caso, se retorna un entero. (3)" #: ../Doc/library/datetime.rst:326 msgid "``t1 = t2 % t3``" msgstr "``t1 = t2 % t3``" #: ../Doc/library/datetime.rst:326 msgid "The remainder is computed as a :class:`timedelta` object. (3)" msgstr "El resto se calcula como un objeto :class:`timedelta`. (3)" #: ../Doc/library/datetime.rst:329 msgid "``q, r = divmod(t1, t2)``" msgstr "``q, r = divmod(t1, t2)``" #: ../Doc/library/datetime.rst:329 msgid "" "Computes the quotient and the remainder: ``q = t1 // t2`` (3) and ``r = t1 % " "t2``. q is an integer and r is a :class:`timedelta` object." msgstr "" "Calcula el cociente y el resto: ``q = t1 // t2`` (3) y ``r = t1% t2``. *q* " "es un entero y *r* es un objeto :class:`timedelta`." #: ../Doc/library/datetime.rst:334 msgid "``+t1``" msgstr "``+t1``" #: ../Doc/library/datetime.rst:334 msgid "Returns a :class:`timedelta` object with the same value. (2)" msgstr "Retorna un objeto :class:`timedelta` con el mismo valor. (2)" #: ../Doc/library/datetime.rst:337 msgid "``-t1``" msgstr "``-t1``" #: ../Doc/library/datetime.rst:337 msgid "" "equivalent to :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." "microseconds*), and to *t1*\\* -1. (1)(4)" msgstr "" "equivalente a :class:`timedelta`\\ (-*t1.days*, -*t1.seconds*, -*t1." "microseconds*), y a *t1*\\* -1. (1)(4)" #: ../Doc/library/datetime.rst:342 msgid "``abs(t)``" msgstr "``abs(t)``" #: ../Doc/library/datetime.rst:342 msgid "" "equivalent to +\\ *t* when ``t.days >= 0``, and to -*t* when ``t.days < 0``. " "(2)" msgstr "" "equivalente a +\\ *t* cuando ``t.days>= 0``, y a *-*t** cuando ``t.days < " "0``. (2)" #: ../Doc/library/datetime.rst:345 msgid "``str(t)``" msgstr "``str(t)``" #: ../Doc/library/datetime.rst:345 msgid "" "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is " "negative for negative ``t``. (5)" msgstr "" "Retorna una cadena de caracteres en la forma ``[D day[s], ][H]H:MM:SS[." "UUUUUU]``, donde D es negativo para negativo ``t``. (5)" #: ../Doc/library/datetime.rst:349 msgid "``repr(t)``" msgstr "``repr(t)``" #: ../Doc/library/datetime.rst:349 msgid "" "Returns a string representation of the :class:`timedelta` object as a " "constructor call with canonical attribute values." msgstr "" "Retorna una representación de cadena del objeto :class:`timedelta` como una " "llamada de constructor con valores de atributos canónicos." #: ../Doc/library/datetime.rst:355 ../Doc/library/datetime.rst:604 #: ../Doc/library/datetime.rst:2494 msgid "Notes:" msgstr "Notas:" #: ../Doc/library/datetime.rst:358 msgid "This is exact but may overflow." msgstr "Esto es exacto pero puede desbordarse." #: ../Doc/library/datetime.rst:361 msgid "This is exact and cannot overflow." msgstr "Esto es exacto pero no puede desbordarse." #: ../Doc/library/datetime.rst:364 msgid "Division by 0 raises :exc:`ZeroDivisionError`." msgstr "División por 0 genera :exc:`ZeroDivisionError`." #: ../Doc/library/datetime.rst:367 msgid "-*timedelta.max* is not representable as a :class:`timedelta` object." msgstr "" "-*timedelta.max* no es representable como un objeto :class:`timedelta`." #: ../Doc/library/datetime.rst:370 msgid "" "String representations of :class:`timedelta` objects are normalized " "similarly to their internal representation. This leads to somewhat unusual " "results for negative timedeltas. For example::" msgstr "" "Las representaciones de cadena de caracteres de los objetos :class:" "`timedelta` se normalizan de manera similar a su representación interna. " "Esto conduce a resultados algo inusuales para *timedeltas* negativos. Por " "ejemplo::" #: ../Doc/library/datetime.rst:380 msgid "" "The expression ``t2 - t3`` will always be equal to the expression ``t2 + (-" "t3)`` except when t3 is equal to ``timedelta.max``; in that case the former " "will produce a result while the latter will overflow." msgstr "" "La expresión ``t2 - t3`` siempre será igual a la expresión ``t2 + (-t3)`` " "excepto cuando *t3* es igual a ``timedelta.max``; en ese caso, el primero " "producirá un resultado mientras que el segundo se desbordará." #: ../Doc/library/datetime.rst:384 msgid "" "In addition to the operations listed above, :class:`timedelta` objects " "support certain additions and subtractions with :class:`date` and :class:`." "datetime` objects (see below)." msgstr "" "Además de las operaciones enumeradas anteriormente, los objetos :class:" "`timedelta` admiten ciertas sumas y restas con objetos :class:`date` y :" "class:`.datetime` (ver más abajo)." #: ../Doc/library/datetime.rst:388 msgid "" "Floor division and true division of a :class:`timedelta` object by another :" "class:`timedelta` object are now supported, as are remainder operations and " "the :func:`divmod` function. True division and multiplication of a :class:" "`timedelta` object by a :class:`float` object are now supported." msgstr "" "La división de piso y la división verdadera de un objeto :class:`timedelta` " "por otro :class:`timedelta` ahora son compatibles, al igual que las " "operaciones restantes y la función :func:`divmod`. La división verdadera y " "multiplicación de un objeto :class:`timedelta` por un objeto :class:" "`flotante` ahora son compatibles." #: ../Doc/library/datetime.rst:395 msgid "" "Comparisons of :class:`timedelta` objects are supported, with some caveats." msgstr "" "Comparaciones de los objetos :class:`timedelta` son compatibles, con algunas " "limitaciones." #: ../Doc/library/datetime.rst:397 msgid "" "The comparisons ``==`` or ``!=`` *always* return a :class:`bool`, no matter " "the type of the compared object::" msgstr "" "Las comparaciones ``==`` o ``!=`` *Siempre* retornan :class:`bool`, sin " "importar el tipo de objeto comparado::" #: ../Doc/library/datetime.rst:408 msgid "" "For all other comparisons (such as ``<`` and ``>``), when a :class:" "`timedelta` object is compared to an object of a different type, :exc:" "`TypeError` is raised::" msgstr "" "Para todas las demás comparaciones (como ``<`` y ``>``), cuando un objeto :" "class:`timedelta` se compara con un objeto de un tipo diferente, se genera :" "exc:`TypeError`::" #: ../Doc/library/datetime.rst:419 msgid "" "In Boolean contexts, a :class:`timedelta` object is considered to be true if " "and only if it isn't equal to ``timedelta(0)``." msgstr "" "En contextos booleanos, un objeto :class:`timedelta` se considera verdadero " "si y solo si no es igual a ``timedelta (0)``." #: ../Doc/library/datetime.rst:422 ../Doc/library/datetime.rst:633 #: ../Doc/library/datetime.rst:1206 ../Doc/library/datetime.rst:1805 msgid "Instance methods:" msgstr "Métodos de instancia:" #: ../Doc/library/datetime.rst:426 msgid "" "Return the total number of seconds contained in the duration. Equivalent to " "``td / timedelta(seconds=1)``. For interval units other than seconds, use " "the division form directly (e.g. ``td / timedelta(microseconds=1)``)." msgstr "" "Retorna el número total de segundos contenidos en la duración. Equivalente a " "``td / timedelta(segundos=1)``. Para unidades de intervalo que no sean " "segundos, use la forma de división directamente (por ejemplo, ``td / " "timedelta(microseconds=1)``)." #: ../Doc/library/datetime.rst:430 msgid "" "Note that for very large time intervals (greater than 270 years on most " "platforms) this method will lose microsecond accuracy." msgstr "" "Tenga en cuenta que para intervalos de tiempo muy largos (más de 270 años en " "la mayoría de las plataformas) este método perderá precisión de " "microsegundos." #: ../Doc/library/datetime.rst:436 msgid "Examples of usage: :class:`timedelta`" msgstr "Ejemplos de uso: :class:`timedelta`" #: ../Doc/library/datetime.rst:438 msgid "An additional example of normalization::" msgstr "Ejemplos adicionales de normalización::" #: ../Doc/library/datetime.rst:450 msgid "Examples of :class:`timedelta` arithmetic::" msgstr "Ejemplos de :class:`timedelta` aritmética::" #: ../Doc/library/datetime.rst:469 msgid ":class:`date` Objects" msgstr "Objeto :class:`date`" #: ../Doc/library/datetime.rst:471 msgid "" "A :class:`date` object represents a date (year, month and day) in an " "idealized calendar, the current Gregorian calendar indefinitely extended in " "both directions." msgstr "" "El objeto :class:`date` representa una fecha (año, mes y día) en un " "calendario idealizado, el calendario gregoriano actual se extiende " "indefinidamente en ambas direcciones." #: ../Doc/library/datetime.rst:475 msgid "" "January 1 of year 1 is called day number 1, January 2 of year 1 is called " "day number 2, and so on. [#]_" msgstr "" "El 1 de enero del año 1 se llama día número 1, el 2 de enero del año 1 se " "llama día número 2, y así sucesivamente. [#]_" #: ../Doc/library/datetime.rst:480 msgid "" "All arguments are required. Arguments must be integers, in the following " "ranges:" msgstr "" "Todos los argumentos son obligatorios. Los argumentos deben ser enteros, en " "los siguientes rangos:" #: ../Doc/library/datetime.rst:483 msgid "``MINYEAR <= year <= MAXYEAR``" msgstr "``MINYEAR <= year <= MAXYEAR``" #: ../Doc/library/datetime.rst:484 msgid "``1 <= month <= 12``" msgstr "``1 <= month <= 12``" #: ../Doc/library/datetime.rst:485 msgid "``1 <= day <= number of days in the given month and year``" msgstr "``1 <= day <= number of days in the given month and year``" #: ../Doc/library/datetime.rst:487 ../Doc/library/datetime.rst:849 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised." msgstr "" "Si se proporciona un argumento fuera de esos rangos, :exc:`ValueError` se " "genera." #: ../Doc/library/datetime.rst:490 ../Doc/library/datetime.rst:854 msgid "Other constructors, all class methods:" msgstr "Otros constructores, todos los métodos de clase:" #: ../Doc/library/datetime.rst:494 msgid "Return the current local date." msgstr "Retorna la fecha local actual." #: ../Doc/library/datetime.rst:496 msgid "This is equivalent to ``date.fromtimestamp(time.time())``." msgstr "Esto es equivalente a ``date.fromtimestamp(time.time())``." #: ../Doc/library/datetime.rst:500 msgid "" "Return the local date corresponding to the POSIX timestamp, such as is " "returned by :func:`time.time`." msgstr "" "Retorna la fecha local correspondiente a la marca de tiempo POSIX, tal como " "la retorna :func:`time.time`." #: ../Doc/library/datetime.rst:503 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`localtime` function, and :exc:" "`OSError` on :c:func:`localtime` failure. It's common for this to be " "restricted to years from 1970 through 2038. Note that on non-POSIX systems " "that include leap seconds in their notion of a timestamp, leap seconds are " "ignored by :meth:`fromtimestamp`." msgstr "" "Esto puede generar :exc:`OverflowError`, si la marca de tiempo está fuera " "del rango de valores admitidos por la plataforma *C* :c:func:`localtime`, y :" "exc:`OSError` en :c:func:`localtime` falla . Es común que esto se restrinja " "a años desde 1970 hasta 2038. Tenga en cuenta que en los sistemas que no son " "POSIX que incluyen segundos bisiestos en su noción de marca de tiempo, los " "segundos bisiestos son ignorados por :meth:`fromtimestamp`." #: ../Doc/library/datetime.rst:510 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " "function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" "`localtime` failure." msgstr "" "Se genera :exc:`OverflowError` en lugar de :exc:`ValueError` si la marca de " "tiempo está fuera del rango de valores admitidos por la plataforma *C* :c:" "func:`localtime`. Se genera :exc:`OSError` en lugar de :exc:`ValueError` " "cuando :c:func:`localtime`, falla." #: ../Doc/library/datetime.rst:519 msgid "" "Return the date corresponding to the proleptic Gregorian ordinal, where " "January 1 of year 1 has ordinal 1." msgstr "" "Retorna la fecha correspondiente al ordinal gregoriano proléptico, donde el " "1 de enero del año 1 tiene el ordinal 1." #: ../Doc/library/datetime.rst:522 msgid "" ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. " "For any date *d*, ``date.fromordinal(d.toordinal()) == d``." msgstr "" ":exc:`ValueError` se genera a menos que ``1 <= ordinal <= date.max." "toordinal()``. ()``. Para cualquier fecha *d*, ``date.fromordinal(d." "toordinal()) == d``." #: ../Doc/library/datetime.rst:529 #, fuzzy msgid "" "Return a :class:`date` corresponding to a *date_string* given in any valid " "ISO 8601 format, except ordinal dates (e.g. ``YYYY-DDD``)::" msgstr "" "Retorna :class:`date` correspondiente a una *date_string* dada en el formato " "``YYYY-MM-DD``::" #: ../Doc/library/datetime.rst:541 msgid "Previously, this method only supported the format ``YYYY-MM-DD``." msgstr "" #: ../Doc/library/datetime.rst:546 msgid "" "Return a :class:`date` corresponding to the ISO calendar date specified by " "year, week and day. This is the inverse of the function :meth:`date." "isocalendar`." msgstr "" "Retorna :class:`date` correspondiente a la fecha del calendario ISO " "especificada por año, semana y día. Esta es la inversa de la función :meth:" "`date.isocalendar`." #: ../Doc/library/datetime.rst:556 msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``." msgstr "La fecha representable más antigua, ``date(MINYEAR, 1, 1)``." #: ../Doc/library/datetime.rst:561 msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``." msgstr "La última fecha representable, ``date(MAXYEAR, 12, 31)``." #: ../Doc/library/datetime.rst:566 msgid "" "The smallest possible difference between non-equal date objects, " "``timedelta(days=1)``." msgstr "" "La menor diferencia entre objetos de fecha no iguales, ``timedelta(days=1)``." #: ../Doc/library/datetime.rst:574 ../Doc/library/datetime.rst:1083 msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "Entre :const:`MINYEAR` y :const:`MAXYEAR` inclusive." #: ../Doc/library/datetime.rst:579 ../Doc/library/datetime.rst:1088 msgid "Between 1 and 12 inclusive." msgstr "Entre 1 y 12 inclusive." #: ../Doc/library/datetime.rst:584 ../Doc/library/datetime.rst:1093 msgid "Between 1 and the number of days in the given month of the given year." msgstr "Entre 1 y el número de días en el mes dado del año dado." #: ../Doc/library/datetime.rst:592 msgid "``date2 = date1 + timedelta``" msgstr "``date2 = date1 + timedelta``" #: ../Doc/library/datetime.rst:592 #, fuzzy msgid "*date2* will be ``timedelta.days`` days after *date1*. (1)" msgstr "*date2* es ``timedelta.days`` días eliminados de *date1*. (1)" #: ../Doc/library/datetime.rst:595 msgid "``date2 = date1 - timedelta``" msgstr "``date2 = date1 - timedelta``" #: ../Doc/library/datetime.rst:595 msgid "Computes *date2* such that ``date2 + timedelta == date1``. (2)" msgstr "Calcula *date2* tal que ``date2 + timedelta == date1``. (2)" #: ../Doc/library/datetime.rst:598 msgid "``timedelta = date1 - date2``" msgstr "``timedelta = date1 - date2``" #: ../Doc/library/datetime.rst:598 ../Doc/library/datetime.rst:1141 msgid "\\(3)" msgstr "\\(3)" #: ../Doc/library/datetime.rst:600 msgid "``date1 < date2``" msgstr "``date1 < date2``" #: ../Doc/library/datetime.rst:600 msgid "" "*date1* is considered less than *date2* when *date1* precedes *date2* in " "time. (4)" msgstr "" "*date1* se considera menor que *date2* cuando *date1* precede a *date2* en " "el tiempo. (4)" #: ../Doc/library/datetime.rst:607 msgid "" "*date2* is moved forward in time if ``timedelta.days > 0``, or backward if " "``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``. " "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:" "`OverflowError` is raised if ``date2.year`` would be smaller than :const:" "`MINYEAR` or larger than :const:`MAXYEAR`." msgstr "" "*date2* se mueve hacia adelante en el tiempo si ``timedelta.days > 0``, o " "hacia atrás si ``timedelta.days < 0``. Después ``date2 - date1 == timedelta. " "days``. ``timedelta.seconds`` y ``timedelta.microseconds`` se ignoran. :exc:" "`OverflowError` se lanza si ``date2.year`` sería menor que :const:`MINYEAR` " "o mayor que :const:`MAXYEAR`." #: ../Doc/library/datetime.rst:614 msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored." msgstr "``timedelta.seconds`` y ``timedelta.microseconds`` son ignorados." #: ../Doc/library/datetime.rst:617 msgid "" "This is exact, and cannot overflow. timedelta.seconds and timedelta." "microseconds are 0, and date2 + timedelta == date1 after." msgstr "" "Esto es exacto y no puede desbordarse. *timedelta.seconds* y *timedelta." "microseconds* son 0, y *date2 + timedelta == date1*." #: ../Doc/library/datetime.rst:621 msgid "" "In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2." "toordinal()``. Date comparison raises :exc:`TypeError` if the other " "comparand isn't also a :class:`date` object. However, ``NotImplemented`` is " "returned instead if the other comparand has a :meth:`timetuple` attribute. " "This hook gives other kinds of date objects a chance at implementing mixed-" "type comparison. If not, when a :class:`date` object is compared to an " "object of a different type, :exc:`TypeError` is raised unless the comparison " "is ``==`` or ``!=``. The latter cases return :const:`False` or :const:" "`True`, respectively." msgstr "" "En otras palabras, ``date1 < date2`` si y solo si ``date1.toordinal()) < " "date2.toordinal()``. La comparación de fechas plantea :exc:`TypeError` si el " "otro elemento comparado no es también un objeto :class:`date`. Sin embargo, " "se retorna ``NotImplemented`` si el otro elemento comparado tiene un " "atributo :meth:`timetuple`. Este enlace ofrece a otros tipos de objetos de " "fecha la posibilidad de implementar una comparación de tipos mixtos. Si no, " "cuando un objeto :class:`date` se compara con un objeto de un tipo " "diferente, :exc:`TypeError` se genera a menos que la comparación sea ``==`` " "or ``!=``. Los últimos casos retorna :const:`False` o :const:`True`, " "respectivamente." #: ../Doc/library/datetime.rst:631 msgid "" "In Boolean contexts, all :class:`date` objects are considered to be true." msgstr "" "En contextos booleanos, todos los objetos :class:`date` se consideran " "verdaderos." #: ../Doc/library/datetime.rst:637 msgid "" "Return a date with the same value, except for those parameters given new " "values by whichever keyword arguments are specified." msgstr "" "Retorna una fecha con el mismo valor, a excepción de aquellos parámetros " "dados nuevos valores por cualquier argumento de palabra clave especificado." #: ../Doc/library/datetime.rst:640 ../Doc/library/datetime.rst:1848 msgid "Example::" msgstr "Ejemplo::" #: ../Doc/library/datetime.rst:650 ../Doc/library/datetime.rst:1319 msgid "" "Return a :class:`time.struct_time` such as returned by :func:`time." "localtime`." msgstr "" "Retorna una :class:`time.struct_time` como la que retorna :func:`time." "localtime`." #: ../Doc/library/datetime.rst:652 msgid "The hours, minutes and seconds are 0, and the DST flag is -1." msgstr "Las horas, minutos y segundos son 0, y el indicador DST es -1." #: ../Doc/library/datetime.rst:654 ../Doc/library/datetime.rst:1321 msgid "``d.timetuple()`` is equivalent to::" msgstr "``d.timetuple()`` es equivalente a::" #: ../Doc/library/datetime.rst:658 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with ``1`` for January 1st." msgstr "" "donde ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` es el " "número de día dentro del año actual que comienza con ``1`` para el 1 de " "enero." #: ../Doc/library/datetime.rst:664 msgid "" "Return the proleptic Gregorian ordinal of the date, where January 1 of year " "1 has ordinal 1. For any :class:`date` object *d*, ``date.fromordinal(d." "toordinal()) == d``." msgstr "" "Retorna el ordinal gregoriano proléptico de la fecha, donde el 1 de enero " "del año 1 tiene el ordinal 1. Para cualquiera :class:`date` object *d*, " "``date.fromordinal(d.toordinal()) == d``." #: ../Doc/library/datetime.rst:671 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :" "meth:`isoweekday`." msgstr "" "Retorna el día de la semana como un número entero, donde el lunes es 0 y el " "domingo es 6. Por ejemplo, ``date(2002, 12, 4).weekday() == 2``, un " "miércoles. Ver también :meth:`isoweekday`." #: ../Doc/library/datetime.rst:678 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "For example, ``date(2002, 12, 4).isoweekday() == 3``, a Wednesday. See also :" "meth:`weekday`, :meth:`isocalendar`." msgstr "" "Retorna el día de la semana como un número entero, donde el lunes es 1 y el " "domingo es 7. Por ejemplo, ``date(2002, 12, 4).isoweekday() == 3``, un " "miércoles. Ver también :meth:`weekday`, :meth:`isocalendar`." #: ../Doc/library/datetime.rst:685 msgid "" "Return a :term:`named tuple` object with three components: ``year``, " "``week`` and ``weekday``." msgstr "" "Retorna un objeto :term:`named tuple` con tres componentes: ``year``, " "``week`` y ``weekday``." #: ../Doc/library/datetime.rst:688 msgid "" "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_" msgstr "" "El calendario ISO es una variante amplia utilizada del calendario " "gregoriano. [#]_" #: ../Doc/library/datetime.rst:690 msgid "" "The ISO year consists of 52 or 53 full weeks, and where a week starts on a " "Monday and ends on a Sunday. The first week of an ISO year is the first " "(Gregorian) calendar week of a year containing a Thursday. This is called " "week number 1, and the ISO year of that Thursday is the same as its " "Gregorian year." msgstr "" "El año ISO consta de 52 o 53 semanas completas, y donde una semana comienza " "un lunes y termina un domingo. La primera semana de un año ISO es la primera " "semana calendario (gregoriana) de un año que contiene un jueves. Esto se " "llama semana número 1, y el año ISO de ese jueves es el mismo que el año " "gregoriano." #: ../Doc/library/datetime.rst:695 msgid "" "For example, 2004 begins on a Thursday, so the first week of ISO year 2004 " "begins on Monday, 29 Dec 2003 and ends on Sunday, 4 Jan 2004::" msgstr "" "Por ejemplo, 2004 comienza en jueves, por lo que la primera semana del año " "ISO 2004 comienza el lunes 29 de diciembre de 2003 y termina el domingo 4 de " "enero de 2004 ::" #: ../Doc/library/datetime.rst:704 msgid "Result changed from a tuple to a :term:`named tuple`." msgstr "El resultado cambió de una tupla a un :term:`named tuple`." #: ../Doc/library/datetime.rst:709 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" msgstr "" "Retorna una cadena de caracteres que representa la fecha en formato ISO " "8601, ``AAAA-MM-DD``::" #: ../Doc/library/datetime.rst:717 msgid "For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``." msgstr "Para una fecha *d*, ``str(d)`` es equivalente a ``d.isoformat()``." #: ../Doc/library/datetime.rst:722 msgid "Return a string representing the date::" msgstr "Retorna una cadena de caracteres que representa la fecha::" #: ../Doc/library/datetime.rst:728 ../Doc/library/datetime.rst:1505 msgid "``d.ctime()`` is equivalent to::" msgstr "``d.ctime()`` es equivalente a::" #: ../Doc/library/datetime.rst:732 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`date.ctime` does not invoke) conforms to " "the C standard." msgstr "" "en plataformas donde la función nativa C :c:func:`ctime` (donde :func:`time." "ctime` llama, pero que :meth:`date.ctime` no se llama) se ajusta al estándar " "C." #: ../Doc/library/datetime.rst:739 msgid "" "Return a string representing the date, controlled by an explicit format " "string. Format codes referring to hours, minutes or seconds will see 0 " "values. For a complete list of formatting directives, see :ref:`strftime-" "strptime-behavior`." msgstr "" "Retorna una cadena de caracteres que representa la fecha, controlada por una " "cadena de formato explícito. Los códigos de formato que se refieren a horas, " "minutos o segundos verán valores 0. Para obtener una lista completa de las " "directivas de formato, consulte :ref:`strftime-strptime-behavior`." #: ../Doc/library/datetime.rst:747 msgid "" "Same as :meth:`.date.strftime`. This makes it possible to specify a format " "string for a :class:`.date` object in :ref:`formatted string literals ` and when using :meth:`str.format`. For a complete list of " "formatting directives, see :ref:`strftime-strptime-behavior`." msgstr "" "Igual que :meth:`.date.strftime`. Esto hace posible especificar una cadena " "de formato para un objeto :class:`.date` en :ref:`literales de cadena con " "formato ` y cuando se usa :meth:`str.format`. Para obtener una " "lista completa de las directivas de formato, consulte :ref:`strftime-" "strptime-behavior`." #: ../Doc/library/datetime.rst:754 msgid "Examples of Usage: :class:`date`" msgstr "Ejemplos de uso: :class:`date`" #: ../Doc/library/datetime.rst:756 msgid "Example of counting days to an event::" msgstr "Ejemplo de contar días para un evento::" #: ../Doc/library/datetime.rst:774 msgid "More examples of working with :class:`date`:" msgstr "Más ejemplos de trabajo con :class:`date`:" #: ../Doc/library/datetime.rst:823 msgid ":class:`.datetime` Objects" msgstr "Objetos :class:`.datetime`" #: ../Doc/library/datetime.rst:825 msgid "" "A :class:`.datetime` object is a single object containing all the " "information from a :class:`date` object and a :class:`.time` object." msgstr "" "El objeto :class:`.datetime` es un único objeto que contiene toda la " "información de un objeto :class:`date` y un objeto :class:`.time`." #: ../Doc/library/datetime.rst:828 msgid "" "Like a :class:`date` object, :class:`.datetime` assumes the current " "Gregorian calendar extended in both directions; like a :class:`.time` " "object, :class:`.datetime` assumes there are exactly 3600\\*24 seconds in " "every day." msgstr "" "Como un objeto :class:`date`, :class:`.datetime` asume el calendario " "gregoriano actual extendido en ambas direcciones; como un objeto :class:`." "time`, :class:`.datetime` supone que hay exactamente 3600\\*24 segundos en " "cada día." #: ../Doc/library/datetime.rst:832 msgid "Constructor:" msgstr "Constructor:" #: ../Doc/library/datetime.rst:836 msgid "" "The *year*, *month* and *day* arguments are required. *tzinfo* may be " "``None``, or an instance of a :class:`tzinfo` subclass. The remaining " "arguments must be integers in the following ranges:" msgstr "" "Se requieren los argumentos *year*, *month* y *day*. *tzinfo* puede ser " "``None``, o una instancia de una subclase :class:`tzinfo`. Los argumentos " "restantes deben ser enteros en los siguientes rangos:" #: ../Doc/library/datetime.rst:840 msgid "``MINYEAR <= year <= MAXYEAR``," msgstr "``MINYEAR <= year <= MAXYEAR``," #: ../Doc/library/datetime.rst:841 msgid "``1 <= month <= 12``," msgstr "``1 <= month <= 12``," #: ../Doc/library/datetime.rst:842 msgid "``1 <= day <= number of days in the given month and year``," msgstr "``1 <= day <= number of days in the given month and year``," #: ../Doc/library/datetime.rst:843 ../Doc/library/datetime.rst:1668 msgid "``0 <= hour < 24``," msgstr "``0 <= hour < 24``," #: ../Doc/library/datetime.rst:844 ../Doc/library/datetime.rst:1669 msgid "``0 <= minute < 60``," msgstr "``0 <= minute < 60``," #: ../Doc/library/datetime.rst:845 ../Doc/library/datetime.rst:1670 msgid "``0 <= second < 60``," msgstr "``0 <= second < 60``," #: ../Doc/library/datetime.rst:846 ../Doc/library/datetime.rst:1671 msgid "``0 <= microsecond < 1000000``," msgstr "``0 <= microsecond < 1000000``," #: ../Doc/library/datetime.rst:847 ../Doc/library/datetime.rst:1672 msgid "``fold in [0, 1]``." msgstr "``fold in [0, 1]``." #: ../Doc/library/datetime.rst:851 ../Doc/library/datetime.rst:1240 #: ../Doc/library/datetime.rst:1815 msgid "Added the ``fold`` argument." msgstr "Se agregó el argumento ``fold``." #: ../Doc/library/datetime.rst:858 msgid "Return the current local datetime, with :attr:`.tzinfo` ``None``." msgstr "Retorna la fecha y hora local actual, con :attr:`.tzinfo` ``None``." #: ../Doc/library/datetime.rst:860 msgid "Equivalent to::" msgstr "Equivalente a::" #: ../Doc/library/datetime.rst:864 msgid "See also :meth:`now`, :meth:`fromtimestamp`." msgstr "Ver también :meth:`now`, :meth:`fromtimestamp`." #: ../Doc/library/datetime.rst:866 msgid "" "This method is functionally equivalent to :meth:`now`, but without a ``tz`` " "parameter." msgstr "" "Este método es funciona como :meth:`now`, pero sin un parámetro ``tz``." #: ../Doc/library/datetime.rst:871 msgid "Return the current local date and time." msgstr "Retorna la fecha y hora local actual." #: ../Doc/library/datetime.rst:873 msgid "" "If optional argument *tz* is ``None`` or not specified, this is like :meth:" "`today`, but, if possible, supplies more precision than can be gotten from " "going through a :func:`time.time` timestamp (for example, this may be " "possible on platforms supplying the C :c:func:`gettimeofday` function)." msgstr "" "Si el argumento opcional *tz* es ``None`` o no se especifica, es como :meth:" "`today`, pero, si es posible, proporciona más precisión de la que se puede " "obtener al pasar por :func:`time.time` marca de tiempo (por ejemplo, esto " "puede ser posible en plataformas que suministran la función C :c:func:" "`gettimeofday`)." #: ../Doc/library/datetime.rst:879 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the current date and time are converted to *tz*’s time zone." msgstr "" "Si *tz* no es ``None``, debe ser una instancia de una subclase :class:" "`tzinfo`, y la fecha y hora actuales se convierten en la zona horaria de " "*tz*." #: ../Doc/library/datetime.rst:882 msgid "This function is preferred over :meth:`today` and :meth:`utcnow`." msgstr "Esta función es preferible a :meth:`today` y :meth:`utcnow`." #: ../Doc/library/datetime.rst:887 msgid "Return the current UTC date and time, with :attr:`.tzinfo` ``None``." msgstr "Retorna la fecha y hora UTC actual, con :attr:`.tzinfo` ``None``." #: ../Doc/library/datetime.rst:889 msgid "" "This is like :meth:`now`, but returns the current UTC date and time, as a " "naive :class:`.datetime` object. An aware current UTC datetime can be " "obtained by calling ``datetime.now(timezone.utc)``. See also :meth:`now`." msgstr "" "Esto es como :meth:`now`, pero retorna la fecha y hora UTC actual, como un " "objeto naíf (*naive*): :class:`.datetime`. Se puede obtener una fecha y hora " "UTC actual consciente (*aware*) llamando a ``datetime.now (timezone.utc)``. " "Ver también :meth:`now`." #: ../Doc/library/datetime.rst:895 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " "UTC. As such, the recommended way to create an object representing the " "current time in UTC is by calling ``datetime.now(timezone.utc)``." msgstr "" "Debido a que los objetos naífs (*naive*) de ``datetime`` son tratados por " "muchos métodos de ``datetime`` como horas locales, se prefiere usar fechas y " "horas conscientes(*aware*) para representar las horas en UTC. Como tal, la " "forma recomendada de crear un objeto que represente la hora actual en UTC es " "llamando a ``datetime.now(timezone.utc)``." #: ../Doc/library/datetime.rst:903 msgid "" "Return the local date and time corresponding to the POSIX timestamp, such as " "is returned by :func:`time.time`. If optional argument *tz* is ``None`` or " "not specified, the timestamp is converted to the platform's local date and " "time, and the returned :class:`.datetime` object is naive." msgstr "" "Retorna la fecha y hora local correspondiente a la marca de tiempo POSIX, " "tal como la retorna :func:`time.time`. Si el argumento opcional *tz* es " "``None`` o no se especifica, la marca de tiempo se convierte a la fecha y " "hora local de la plataforma, y el objeto retornado :class:`.datetime` es " "naíf (*naive*)." #: ../Doc/library/datetime.rst:908 msgid "" "If *tz* is not ``None``, it must be an instance of a :class:`tzinfo` " "subclass, and the timestamp is converted to *tz*’s time zone." msgstr "" "Si *tz* no es ``None``, debe ser una instancia de una subclase :class:" "`tzinfo`, y la fecha y hora actuales se convierten en la zona horaria de " "*tz*." #: ../Doc/library/datetime.rst:911 msgid "" ":meth:`fromtimestamp` may raise :exc:`OverflowError`, if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " "or :c:func:`gmtime` functions, and :exc:`OSError` on :c:func:`localtime` or :" "c:func:`gmtime` failure. It's common for this to be restricted to years in " "1970 through 2038. Note that on non-POSIX systems that include leap seconds " "in their notion of a timestamp, leap seconds are ignored by :meth:" "`fromtimestamp`, and then it's possible to have two timestamps differing by " "a second that yield identical :class:`.datetime` objects. This method is " "preferred over :meth:`utcfromtimestamp`." msgstr "" ":meth:`fromtimestamp` puede aumentar :exc:`OverflowError`, si la marca de " "tiempo está fuera del rango de valores admitidos por la plataforma *C* :c:" "func:`localtime` o :c:func:`gmtime`, y :exc:`OSError` en :c:func:`localtime` " "o :c:func:`gmtime` falla. Es común que esto se restrinja a los años 1970 a " "2038. Tenga en cuenta que en los sistemas que no son POSIX que incluyen " "segundos bisiestos en su noción de marca de tiempo, los segundos bisiestos " "son ignorados por :meth:`fromtimestamp`, y luego es posible tener dos marcas " "de tiempo que difieren en un segundo que producen objetos idénticos :class:`." "datetime`. Se prefiere este método sobre :meth:`utcfromtimestamp`." #: ../Doc/library/datetime.rst:922 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`localtime` " "or :c:func:`gmtime` functions. Raise :exc:`OSError` instead of :exc:" "`ValueError` on :c:func:`localtime` or :c:func:`gmtime` failure." msgstr "" "Se genera :exc:`OverflowError` en lugar de :exc:`ValueError` si la marca de " "tiempo está fuera del rango de valores admitidos por la plataforma *C* :c:" "func:`localtime` o :c:func:`gmtime`. genera :exc:`OSError` en lugar de la " "función :exc:`ValueError` en :c:func:`localtime` o error :c:func:`gmtime`." #: ../Doc/library/datetime.rst:929 msgid ":meth:`fromtimestamp` may return instances with :attr:`.fold` set to 1." msgstr "" ":meth:`fromtimestamp` puede retornar instancias con :attr:`.fold` " "establecido en 1." #: ../Doc/library/datetime.rst:934 msgid "" "Return the UTC :class:`.datetime` corresponding to the POSIX timestamp, " "with :attr:`.tzinfo` ``None``. (The resulting object is naive.)" msgstr "" "Retorna el UTC :class:`.datetime` correspondiente a la marca de tiempo " "POSIX, con :attr:`.tzinfo` ``None``. (El objeto resultante es naíf " "(*naive*).)" #: ../Doc/library/datetime.rst:937 msgid "" "This may raise :exc:`OverflowError`, if the timestamp is out of the range of " "values supported by the platform C :c:func:`gmtime` function, and :exc:" "`OSError` on :c:func:`gmtime` failure. It's common for this to be restricted " "to years in 1970 through 2038." msgstr "" "Esto puede generar :exc:`OverflowError`, si la marca de tiempo está fuera " "del rango de valores admitidos por la plataforma C :c:func:`gmtime`, y error " "en :exc:`OSError` en :c:func:`gmtime`. Es común que esto se restrinja a los " "años entre1970 a 2038." #: ../Doc/library/datetime.rst:942 msgid "To get an aware :class:`.datetime` object, call :meth:`fromtimestamp`::" msgstr "" "Para conocer un objeto :class:`.datetime`, llama a :meth:`fromtimestamp`::" #: ../Doc/library/datetime.rst:946 msgid "" "On the POSIX compliant platforms, it is equivalent to the following " "expression::" msgstr "" "En las plataformas compatibles con POSIX, es equivalente a la siguiente " "expresión::" #: ../Doc/library/datetime.rst:951 msgid "" "except the latter formula always supports the full years range: between :" "const:`MINYEAR` and :const:`MAXYEAR` inclusive." msgstr "" "excepto que la última fórmula siempre admite el rango de años completo: " "entre :const:`MINYEAR` y :const:`MAXYEAR` inclusive." #: ../Doc/library/datetime.rst:956 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " "UTC. As such, the recommended way to create an object representing a " "specific timestamp in UTC is by calling ``datetime.fromtimestamp(timestamp, " "tz=timezone.utc)``." msgstr "" "Debido a que los objetos naíf (*naive*) de ``datetime`` son tratados por " "muchos métodos de ``datetime`` como horas locales, se prefiere usar fechas y " "horas conscientes para representar las horas en UTC. Como tal, la forma " "recomendada de crear un objeto que represente una marca de tiempo específica " "en UTC es llamando a ``datetime.fromtimestamp(timestamp, tz=timezone.utc)``." #: ../Doc/library/datetime.rst:962 msgid "" "Raise :exc:`OverflowError` instead of :exc:`ValueError` if the timestamp is " "out of the range of values supported by the platform C :c:func:`gmtime` " "function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:" "`gmtime` failure." msgstr "" "Se genera :exc:`OverflowError` en lugar de :exc:`ValueError` si la marca de " "tiempo está fuera del rango de valores admitidos por la plataforma *C* :c:" "func:`gmtime`. genera :exc:`OSError` en lugar de :exc:`ValueError` en el " "error de :c:func:`gmtime`." #: ../Doc/library/datetime.rst:971 msgid "" "Return the :class:`.datetime` corresponding to the proleptic Gregorian " "ordinal, where January 1 of year 1 has ordinal 1. :exc:`ValueError` is " "raised unless ``1 <= ordinal <= datetime.max.toordinal()``. The hour, " "minute, second and microsecond of the result are all 0, and :attr:`.tzinfo` " "is ``None``." msgstr "" "Se genera :class:`.datetime` correspondiente al ordinal del proléptico " "gregoriano, donde el 1 de enero del año 1 tiene ordinal 1. :exc:`ValueError` " "se genera a menos que ``1 <= ordinal <= datetime.max.toordinal()``. La hora, " "minuto, segundo y microsegundo del resultado son todos 0, y :attr:`.tzinfo` " "es` `None``." #: ../Doc/library/datetime.rst:979 msgid "" "Return a new :class:`.datetime` object whose date components are equal to " "the given :class:`date` object's, and whose time components are equal to the " "given :class:`.time` object's. If the *tzinfo* argument is provided, its " "value is used to set the :attr:`.tzinfo` attribute of the result, otherwise " "the :attr:`~.time.tzinfo` attribute of the *time* argument is used." msgstr "" "Se genera un nuevo objeto :class:`.datetime` cuyos componentes de fecha son " "iguales a los dados en el objeto :class:`date`, y cuyos componentes de " "tiempo son iguales a los dados en el objeto :class:`.time`. Si se " "proporciona el argumento *tzinfo*, su valor se usa para establecer el " "atributo :attr:`.tzinfo` del resultado; de lo contrario, se usa el atributo :" "attr:`~.time.tzinfo` del argumento *time*." #: ../Doc/library/datetime.rst:986 msgid "" "For any :class:`.datetime` object *d*, ``d == datetime.combine(d.date(), d." "time(), d.tzinfo)``. If date is a :class:`.datetime` object, its time " "components and :attr:`.tzinfo` attributes are ignored." msgstr "" "Para cualquier objeto de :class:`.datetime` *d*, ``d == datetime.combine(d." "date(), d.time(), d.tzinfo)``. Si la fecha es un objeto de :class:`." "datetime`, se ignoran sus componentes de tiempo y :attr:`.tzinfo`." #: ../Doc/library/datetime.rst:991 msgid "Added the *tzinfo* argument." msgstr "Se agregó el argumento *tzinfo*." #: ../Doc/library/datetime.rst:997 #, fuzzy msgid "" "Return a :class:`.datetime` corresponding to a *date_string* in any valid " "ISO 8601 format, with the following exceptions:" msgstr "" "Retorna :class:`.datetime` correspondiente a *date_string*, analizado según " "*format*." #: ../Doc/library/datetime.rst:1000 ../Doc/library/datetime.rst:1771 msgid "Time zone offsets may have fractional seconds." msgstr "" #: ../Doc/library/datetime.rst:1001 #, fuzzy msgid "The ``T`` separator may be replaced by any single unicode character." msgstr "donde ``*`` puede coincidir con cualquier carácter individual." #: ../Doc/library/datetime.rst:1002 msgid "Ordinal dates are not currently supported." msgstr "" #: ../Doc/library/datetime.rst:1003 ../Doc/library/datetime.rst:1776 msgid "Fractional hours and minutes are not supported." msgstr "" #: ../Doc/library/datetime.rst:1005 ../Doc/library/datetime.rst:1434 #: ../Doc/library/datetime.rst:1778 msgid "Examples::" msgstr "Ejemplos::" #: ../Doc/library/datetime.rst:1029 msgid "" "Previously, this method only supported formats that could be emitted by :" "meth:`date.isoformat()` or :meth:`datetime.isoformat()`." msgstr "" #: ../Doc/library/datetime.rst:1036 msgid "" "Return a :class:`.datetime` corresponding to the ISO calendar date specified " "by year, week and day. The non-date components of the datetime are populated " "with their normal default values. This is the inverse of the function :meth:" "`datetime.isocalendar`." msgstr "" "Retorna :class:`.datetime` correspondiente a la fecha del calendario ISO " "especificada por año, semana y día. Los componentes que no son de fecha de " "fecha y hora se rellenan con sus valores predeterminados normales. Esta es " "la inversa de la función :meth:`datetime.isocalendar`." #: ../Doc/library/datetime.rst:1045 msgid "" "Return a :class:`.datetime` corresponding to *date_string*, parsed according " "to *format*." msgstr "" "Retorna :class:`.datetime` correspondiente a *date_string*, analizado según " "*format*." #: ../Doc/library/datetime.rst:1048 msgid "This is equivalent to::" msgstr "Esto es equivalente a::" #: ../Doc/library/datetime.rst:1052 msgid "" ":exc:`ValueError` is raised if the date_string and format can't be parsed " "by :func:`time.strptime` or if it returns a value which isn't a time tuple. " "For a complete list of formatting directives, see :ref:`strftime-strptime-" "behavior`." msgstr "" "Se genera :exc:`ValueError` se genera si *date_string* y el formato no " "pueden ser analizados por :func:`time.strptime` o si retorna un valor que no " "es una tupla de tiempo. Para obtener una lista completa de las directivas de " "formato, consulte :ref:`strftime-strptime-behavior`." #: ../Doc/library/datetime.rst:1063 msgid "" "The earliest representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." msgstr "" "La primera fecha representable :class:`.datetime`, ``datetime(MINYEAR, 1, 1, " "tzinfo=None)``." #: ../Doc/library/datetime.rst:1069 msgid "" "The latest representable :class:`.datetime`, ``datetime(MAXYEAR, 12, 31, 23, " "59, 59, 999999, tzinfo=None)``." msgstr "" "La última fecha representable :class:`.datetime`, ``datetime(MAXYEAR, 12, " "31, 23, 59, 59, 999999, tzinfo=None)``." #: ../Doc/library/datetime.rst:1075 msgid "" "The smallest possible difference between non-equal :class:`.datetime` " "objects, ``timedelta(microseconds=1)``." msgstr "" "La diferencia más pequeña posible entre objetos no iguales :class:`." "datetime`, ``timedelta(microseconds=1)``." #: ../Doc/library/datetime.rst:1098 ../Doc/library/datetime.rst:1701 msgid "In ``range(24)``." msgstr "En ``range(24)``." #: ../Doc/library/datetime.rst:1103 ../Doc/library/datetime.rst:1108 #: ../Doc/library/datetime.rst:1706 ../Doc/library/datetime.rst:1711 msgid "In ``range(60)``." msgstr "En ``range(60)``." #: ../Doc/library/datetime.rst:1113 ../Doc/library/datetime.rst:1716 msgid "In ``range(1000000)``." msgstr "En ``range(1000000)``." #: ../Doc/library/datetime.rst:1118 msgid "" "The object passed as the *tzinfo* argument to the :class:`.datetime` " "constructor, or ``None`` if none was passed." msgstr "" "El objeto pasó como argumento *tzinfo* al constructor :class:`.datetime`, o " "``None`` si no se pasó ninguno." #: ../Doc/library/datetime.rst:1124 ../Doc/library/datetime.rst:1727 msgid "" "In ``[0, 1]``. Used to disambiguate wall times during a repeated interval. " "(A repeated interval occurs when clocks are rolled back at the end of " "daylight saving time or when the UTC offset for the current zone is " "decreased for political reasons.) The value 0 (1) represents the earlier " "(later) of the two moments with the same wall time representation." msgstr "" "En ``[0, 1]``. Se usa para desambiguar los tiempos de pared durante un " "intervalo repetido. (Se produce un intervalo repetido cuando los relojes se " "retrotraen al final del horario de verano o cuando el desplazamiento UTC " "para la zona actual se reduce por razones políticas). El valor 0 (1) " "representa el anterior (posterior) de los dos momentos con la misma " "representación de tiempo real transcurrido (*wall time*)." #: ../Doc/library/datetime.rst:1137 msgid "``datetime2 = datetime1 + timedelta``" msgstr "``datetime2 = datetime1 + timedelta``" #: ../Doc/library/datetime.rst:1137 ../Doc/library/datetime.rst:2329 #: ../Doc/library/datetime.rst:2334 ../Doc/library/datetime.rst:2346 #: ../Doc/library/datetime.rst:2351 ../Doc/library/datetime.rst:2411 #: ../Doc/library/datetime.rst:2416 ../Doc/library/datetime.rst:2420 msgid "\\(1)" msgstr "\\(1)" #: ../Doc/library/datetime.rst:1139 msgid "``datetime2 = datetime1 - timedelta``" msgstr "``datetime2 = datetime1 - timedelta``" #: ../Doc/library/datetime.rst:1139 ../Doc/library/datetime.rst:2362 msgid "\\(2)" msgstr "\\(2)" #: ../Doc/library/datetime.rst:1141 msgid "``timedelta = datetime1 - datetime2``" msgstr "``timedelta = datetime1 - datetime2``" #: ../Doc/library/datetime.rst:1143 msgid "``datetime1 < datetime2``" msgstr "``datetime1 < datetime2``" #: ../Doc/library/datetime.rst:1143 msgid "Compares :class:`.datetime` to :class:`.datetime`. (4)" msgstr "Compara :class:`.datetime` to :class:`.datetime`. (4)" #: ../Doc/library/datetime.rst:1148 msgid "" "datetime2 is a duration of timedelta removed from datetime1, moving forward " "in time if ``timedelta.days`` > 0, or backward if ``timedelta.days`` < 0. " "The result has the same :attr:`~.datetime.tzinfo` attribute as the input " "datetime, and datetime2 - datetime1 == timedelta after. :exc:`OverflowError` " "is raised if datetime2.year would be smaller than :const:`MINYEAR` or larger " "than :const:`MAXYEAR`. Note that no time zone adjustments are done even if " "the input is an aware object." msgstr "" "*datetime2* es una duración de *timedelta* eliminada de *datetime1*, " "avanzando en el tiempo si ``timedelta.days``> 0, o hacia atrás si " "``timedelta.days`` < 0. El resultado tiene el mismo :attr:`~.datetime." "tzinfo` como el atributo *datetime* y *datetime2 - datetime1 == " "timedelta* . :exc:`OverflowError` se genera si *datetime2.year* sería menor " "que :const:`MINYEAR` o mayor que :const:`MAXYEAR`. Tenga en cuenta que no se " "realizan ajustes de zona horaria, incluso si la entrada es un objeto " "consciente." #: ../Doc/library/datetime.rst:1157 msgid "" "Computes the datetime2 such that datetime2 + timedelta == datetime1. As for " "addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the " "input datetime, and no time zone adjustments are done even if the input is " "aware." msgstr "" "Calcula el *datetime* tal que *datetime2 + timedelta == datetime1*. En " "cuanto a la adición, el resultado tiene el mismo atributo :attr:`~ .datetime." "tzinfo` que la fecha y hora de entrada, y no se realizan ajustes de zona " "horaria, incluso si la entrada es consciente." #: ../Doc/library/datetime.rst:1162 msgid "" "Subtraction of a :class:`.datetime` from a :class:`.datetime` is defined " "only if both operands are naive, or if both are aware. If one is aware and " "the other is naive, :exc:`TypeError` is raised." msgstr "" "La resta de :class:`.datetime` de la :class:`.datetime` se define solo si " "ambos operandos son naíf(*naive*), o si ambos son conscientes(*aware*). Si " "uno es consciente y el otro es naíf, :exc:`TypeError` aparece." #: ../Doc/library/datetime.rst:1166 msgid "" "If both are naive, or both are aware and have the same :attr:`~.datetime." "tzinfo` attribute, the :attr:`~.datetime.tzinfo` attributes are ignored, and " "the result is a :class:`timedelta` object *t* such that ``datetime2 + t == " "datetime1``. No time zone adjustments are done in this case." msgstr "" "Si ambos son naíf (*naive*), o ambos son conscientes (*aware*) y tienen el " "mismo atributo :attr:`~.datetime.tzinfo`, los atributos :attr:`~.datetime." "tzinfo` se ignoran y el resultado es un objeto de :class:`timedelta ` *t* " "tal que ``datetime2 + t == datetime1``. No se realizan ajustes de zona " "horaria en este caso." #: ../Doc/library/datetime.rst:1171 msgid "" "If both are aware and have different :attr:`~.datetime.tzinfo` attributes, " "``a-b`` acts as if *a* and *b* were first converted to naive UTC datetimes " "first. The result is ``(a.replace(tzinfo=None) - a.utcoffset()) - (b." "replace(tzinfo=None) - b.utcoffset())`` except that the implementation never " "overflows." msgstr "" "Si ambos son conscientes (*aware*) y tienen atributos diferentes :attr:`~ ." "datetime.tzinfo`,` `a-b`` actúa como si primero *a* y *b* se convirtieran " "primero en fechas naíf (*naive*) UTC. El resultado es ``(a.replace(tzinfo = " "None) - a.utcoffset()) - (b.replace (tzinfo = None) - b.utcoffset())`` " "excepto que la implementación nunca se desborda." #: ../Doc/library/datetime.rst:1177 msgid "" "*datetime1* is considered less than *datetime2* when *datetime1* precedes " "*datetime2* in time." msgstr "" "*datetime1* se considera menor que *datetime2* cuando *datetime1* precede " "*datetime2* en el tiempo." #: ../Doc/library/datetime.rst:1180 msgid "" "If one comparand is naive and the other is aware, :exc:`TypeError` is raised " "if an order comparison is attempted. For equality comparisons, naive " "instances are never equal to aware instances." msgstr "" "Si un de los elementos comparados es naíf (*naive*) y el otro lo sabe, se " "genera un :exc:`TypeError` si se intenta una comparación de órdenes. Para " "las comparaciones de igualdad, las instancias naíf nunca son iguales a las " "instancias conscientes (*aware*)." #: ../Doc/library/datetime.rst:1184 msgid "" "If both comparands are aware, and have the same :attr:`~.datetime.tzinfo` " "attribute, the common :attr:`~.datetime.tzinfo` attribute is ignored and the " "base datetimes are compared. If both comparands are aware and have " "different :attr:`~.datetime.tzinfo` attributes, the comparands are first " "adjusted by subtracting their UTC offsets (obtained from ``self." "utcoffset()``)." msgstr "" "Si ambos comparados son conscientes (*aware*) y tienen el mismo atributo :" "attr:`~.datetime.tzinfo`, el atributo común :attr:`~.datetime.tzinfo` se " "ignora y se comparan las fechas base. Si ambos elementos comparados son " "conscientes y tienen atributos diferentes :attr:`~.datetime.tzinfo`, los " "elementos comparados se ajustan primero restando sus compensaciones UTC " "(obtenidas de ``self.utcoffset()``)." #: ../Doc/library/datetime.rst:1190 msgid "" "Equality comparisons between aware and naive :class:`.datetime` instances " "don't raise :exc:`TypeError`." msgstr "" "Las comparaciones de igualdad entre las instancias conscientes (*aware*) y " "naíf (*naive*) :class:`.datetime` no generan :exc:`TypeError`." #: ../Doc/library/datetime.rst:1196 msgid "" "In order to stop comparison from falling back to the default scheme of " "comparing object addresses, datetime comparison normally raises :exc:" "`TypeError` if the other comparand isn't also a :class:`.datetime` object. " "However, ``NotImplemented`` is returned instead if the other comparand has " "a :meth:`timetuple` attribute. This hook gives other kinds of date objects a " "chance at implementing mixed-type comparison. If not, when a :class:`." "datetime` object is compared to an object of a different type, :exc:" "`TypeError` is raised unless the comparison is ``==`` or ``!=``. The latter " "cases return :const:`False` or :const:`True`, respectively." msgstr "" "Para evitar que la comparación vuelva al esquema predeterminado de " "comparación de direcciones de objetos, la comparación de fecha y hora " "normalmente genera :exc:`TypeError` si el otro elemento comparado no es " "también un objeto :class:`.datetime`. Sin embargo, ``NotImplemented`` se " "retorna si el otro elemento comparado tiene un atributo :meth:`timetuple` . " "Este enlace ofrece a otros tipos de objetos de fecha la posibilidad de " "implementar una comparación de tipos mixtos. Si no, cuándo un objeto :class:" "`.datetime` se compara con un objeto de un tipo diferente, se genera :exc:" "`TypeError` a menos que la comparación sea ``==`` o ``!=``. Los últimos " "casos retornan :const:`False` o :const:`True`, respectivamente." #: ../Doc/library/datetime.rst:1210 msgid "Return :class:`date` object with same year, month and day." msgstr "Retorna el objeto :class:`date` con el mismo año, mes y día." #: ../Doc/library/datetime.rst:1215 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond and " "fold. :attr:`.tzinfo` is ``None``. See also method :meth:`timetz`." msgstr "" "Retorna el objeto :class:`.time` con la misma hora, minuto, segundo, " "microsegundo y doblado(*fold*). :attr:`.tzinfo` es ``None``. Ver también " "método :meth:`timetz`." #: ../Doc/library/datetime.rst:1218 ../Doc/library/datetime.rst:1227 msgid "The fold value is copied to the returned :class:`.time` object." msgstr "" "El valor de plegado (*fold value*) se copia en el objeto :class:`time` " "retornado." #: ../Doc/library/datetime.rst:1224 msgid "" "Return :class:`.time` object with same hour, minute, second, microsecond, " "fold, and tzinfo attributes. See also method :meth:`time`." msgstr "" "Retorna el objeto :class:`.time` con los mismos atributos de hora, minuto, " "segundo, microsegundo, pliegue y *tzinfo*. Ver también método :meth:`time`." #: ../Doc/library/datetime.rst:1235 msgid "" "Return a datetime with the same attributes, except for those attributes " "given new values by whichever keyword arguments are specified. Note that " "``tzinfo=None`` can be specified to create a naive datetime from an aware " "datetime with no conversion of date and time data." msgstr "" "Retorna una fecha y hora con los mismos atributos, a excepción de aquellos " "atributos a los que se les asignan nuevos valores según los argumentos de " "palabras clave especificados. Tenga en cuenta que ``tzinfo = None`` se puede " "especificar para crear una fecha y hora naíf (*naive*) a partir de una fecha " "y hora consciente(*aware*) sin conversión de datos de fecha y hora." #: ../Doc/library/datetime.rst:1246 msgid "" "Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, " "adjusting the date and time data so the result is the same UTC time as " "*self*, but in *tz*'s local time." msgstr "" "Retorna un objeto :class:`.datetime` con el atributo nuevo :attr:`.tzinfo` " "*tz*, ajustando los datos de fecha y hora para que el resultado sea la misma " "hora UTC que *self*, pero en hora local *tz*." #: ../Doc/library/datetime.rst:1250 msgid "" "If provided, *tz* must be an instance of a :class:`tzinfo` subclass, and " "its :meth:`utcoffset` and :meth:`dst` methods must not return ``None``. If " "*self* is naive, it is presumed to represent time in the system timezone." msgstr "" "Si se proporciona, *tz* debe ser una instancia de una subclase :class:" "`tzinfo`, y sus métodos :meth:`utcoffset` y :meth:`dst`no deben retornar " "``None``.Si *self* es naíf, se supone que representa la hora en la zona " "horaria del sistema." #: ../Doc/library/datetime.rst:1254 msgid "" "If called without arguments (or with ``tz=None``) the system local timezone " "is assumed for the target timezone. The ``.tzinfo`` attribute of the " "converted datetime instance will be set to an instance of :class:`timezone` " "with the zone name and offset obtained from the OS." msgstr "" "Si se llama sin argumentos (o con ``tz=None``), se asume la zona horaria " "local del sistema para la zona horaria objetivo. El atributo ``.tzinfo`` de " "la instancia de fecha y hora convertida se establecerá en una instancia de :" "class:`timezone` con el nombre de zona y el desplazamiento obtenido del " "sistema operativo." #: ../Doc/library/datetime.rst:1259 msgid "" "If ``self.tzinfo`` is *tz*, ``self.astimezone(tz)`` is equal to *self*: no " "adjustment of date or time data is performed. Else the result is local time " "in the timezone *tz*, representing the same UTC time as *self*: after " "``astz = dt.astimezone(tz)``, ``astz - astz.utcoffset()`` will have the same " "date and time data as ``dt - dt.utcoffset()``." msgstr "" "Si ``self.tzinfo`` es *tz*, ``self.astimezone (tz)`` es igual a *self*: no " "se realiza ningún ajuste de datos de fecha u hora. De lo contrario, el " "resultado es la hora local en la zona horaria *tz*, que representa la misma " "hora UTC que *self*: después de ``astz = dt.astimezone (tz)``, ``astz - astz." "utcoffset()`` tendrá los mismos datos de fecha y hora que ``dt - dt." "utcoffset()``." #: ../Doc/library/datetime.rst:1265 msgid "" "If you merely want to attach a time zone object *tz* to a datetime *dt* " "without adjustment of date and time data, use ``dt.replace(tzinfo=tz)``. If " "you merely want to remove the time zone object from an aware datetime *dt* " "without conversion of date and time data, use ``dt.replace(tzinfo=None)``." msgstr "" "Si simplemente desea adjuntar un objeto de zona horaria *tz* a una fecha y " "hora *dt* sin ajustar los datos de fecha y hora, use ``dt.replace (tzinfo = " "tz)``. Si simplemente desea eliminar el objeto de zona horaria de una fecha " "y hora *dt* sin conversión de datos de fecha y hora, use ``dt.replace " "(tzinfo = None)``." #: ../Doc/library/datetime.rst:1270 msgid "" "Note that the default :meth:`tzinfo.fromutc` method can be overridden in a :" "class:`tzinfo` subclass to affect the result returned by :meth:`astimezone`. " "Ignoring error cases, :meth:`astimezone` acts like::" msgstr "" "Tenga en cuenta que el método predeterminado :meth:`tzinfo.fromutc` se puede " "reemplazar en una subclase :class:`tzinfo` para afectar el resultado " "retornado por :meth:`astimezone`. :meth:`astimezone` ignora los casos de " "error, actúa como::" #: ../Doc/library/datetime.rst:1282 msgid "*tz* now can be omitted." msgstr "*tz* ahora puede ser omitido." #: ../Doc/library/datetime.rst:1285 msgid "" "The :meth:`astimezone` method can now be called on naive instances that are " "presumed to represent system local time." msgstr "" "El método :meth:`astimezone` ahora se puede invocar en instancias naíf " "(*naive*) que se supone representan la hora local del sistema." #: ../Doc/library/datetime.rst:1292 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(self)``, and raises an exception if the latter doesn't return " "``None`` or a :class:`timedelta` object with magnitude less than one day." msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, de lo contrario retorna " "``self.tzinfo.utcoffset (self)` `, y genera una excepción si este último no " "retorna ``None`` o un objeto :class:`timedelta` con magnitud inferior a un " "día." #: ../Doc/library/datetime.rst:1296 ../Doc/library/datetime.rst:1890 #: ../Doc/library/datetime.rst:1996 ../Doc/library/datetime.rst:2241 #: ../Doc/library/datetime.rst:2253 ../Doc/library/datetime.rst:2550 msgid "The UTC offset is not restricted to a whole number of minutes." msgstr "El desfase UTC no está restringido a un número entero de minutos." #: ../Doc/library/datetime.rst:1302 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(self)``, and raises an exception if the latter doesn't return ``None`` " "or a :class:`timedelta` object with magnitude less than one day." msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, de lo contrario retorna " "``self.tzinfo.utcoffset (self)``, y genera una excepción si este último no " "retorna ``None`` o un objeto :class:`timedelta` con magnitud inferior a un " "día." #: ../Doc/library/datetime.rst:1306 ../Doc/library/datetime.rst:1900 #: ../Doc/library/datetime.rst:2050 msgid "The DST offset is not restricted to a whole number of minutes." msgstr "El desfase DST no está restringido a un número entero de minutos." #: ../Doc/library/datetime.rst:1312 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(self)``, raises an exception if the latter doesn't return ``None`` or " "a string object," msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, de lo contrario retorna " "``self.tzinfo.tzname(self)``, genera una excepción si este último no retorna " "``None`` o un objeto de cadena de caracteres," #: ../Doc/library/datetime.rst:1327 msgid "" "where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the " "day number within the current year starting with ``1`` for January 1st. The :" "attr:`tm_isdst` flag of the result is set according to the :meth:`dst` " "method: :attr:`.tzinfo` is ``None`` or :meth:`dst` returns ``None``, :attr:" "`tm_isdst` is set to ``-1``; else if :meth:`dst` returns a non-zero value, :" "attr:`tm_isdst` is set to ``1``; else :attr:`tm_isdst` is set to ``0``." msgstr "" "donde ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` es el " "número de día dentro del año actual que comienza con ``1`` para el 1 de " "enero. El indicador :attr:`tm_isdst` del resultado se establece de acuerdo " "con el método :meth:`dst`: :attr:`.tzinfo` es ``None`` o :meth:`dst` retorna " "``None``, :attr:`tm_isdst` se establece en ``-1``; si no :meth:`dst` retorna " "un valor distinto de cero, :attr:`tm_isdst` se establece en ``1``; de lo " "contrario :attr:`tm_isdst` se establece en ``0``." #: ../Doc/library/datetime.rst:1338 msgid "" "If :class:`.datetime` instance *d* is naive, this is the same as ``d." "timetuple()`` except that :attr:`tm_isdst` is forced to 0 regardless of what " "``d.dst()`` returns. DST is never in effect for a UTC time." msgstr "" "Si :class:`.datetime` instancia *d* es naíf (*naive*), esto es lo mismo que " "``d.timetuple()`` excepto que :attr:`tm_isdst` se fuerza a 0 " "independientemente de lo que retorna ``d.dst( )``. El horario de verano " "nunca está en vigencia durante un horario UTC." #: ../Doc/library/datetime.rst:1342 msgid "" "If *d* is aware, *d* is normalized to UTC time, by subtracting ``d." "utcoffset()``, and a :class:`time.struct_time` for the normalized time is " "returned. :attr:`tm_isdst` is forced to 0. Note that an :exc:`OverflowError` " "may be raised if *d*.year was ``MINYEAR`` or ``MAXYEAR`` and UTC adjustment " "spills over a year boundary." msgstr "" "Si *d* es consciente (*aware*), *d* se normaliza a la hora UTC, restando ``d." "utcoffset()``, y se retorna :class:`time.struct_time` para la hora " "normalizada. :attr:`tm_isdst` se fuerza a 0. Tenga en cuenta que un :exc:" "`OverflowError` puede aparecer si **d*.year** fue ``MINYEAR`` o ``MAXYEAR`` " "y el ajuste UTC se derrama durante el límite de un año." #: ../Doc/library/datetime.rst:1351 msgid "" "Because naive ``datetime`` objects are treated by many ``datetime`` methods " "as local times, it is preferred to use aware datetimes to represent times in " "UTC; as a result, using ``utcfromtimetuple`` may give misleading results. If " "you have a naive ``datetime`` representing UTC, use ``datetime." "replace(tzinfo=timezone.utc)`` to make it aware, at which point you can use :" "meth:`.datetime.timetuple`." msgstr "" "Debido a que los objetos naíf (*naive*) de ``datetime`` son tratados por " "muchos métodos de ``datetime`` como horas locales, se prefiere usar fechas y " "horas conscientes (*aware*) para representar las horas en UTC; como " "resultado, el uso de ``utcfromtimetuple`` puede dar resultados engañosos. Si " "tiene una ``datetime`` naíf que representa UTC, use ``datetime." "replace(tzinfo=timezone.utc)`` para que sea consciente, en cuyo punto se " "puede usar :meth:`.datetime.timetuple`." #: ../Doc/library/datetime.rst:1360 msgid "" "Return the proleptic Gregorian ordinal of the date. The same as ``self." "date().toordinal()``." msgstr "" "Retorna el ordinal gregoriano proléptico de la fecha. Lo mismo que ``self." "date().toordinal()``." #: ../Doc/library/datetime.rst:1365 msgid "" "Return POSIX timestamp corresponding to the :class:`.datetime` instance. The " "return value is a :class:`float` similar to that returned by :func:`time." "time`." msgstr "" "Retorna la marca de tiempo (*timestamp*) POSIX correspondiente a la " "instancia :class:`.datetime`. El valor de retorno es :class:`float` similar " "al retornado por :func:`time.time`." #: ../Doc/library/datetime.rst:1369 msgid "" "Naive :class:`.datetime` instances are assumed to represent local time and " "this method relies on the platform C :c:func:`mktime` function to perform " "the conversion. Since :class:`.datetime` supports wider range of values " "than :c:func:`mktime` on many platforms, this method may raise :exc:" "`OverflowError` for times far in the past or far in the future." msgstr "" "Se supone que las instancias Naíf :class:`.datetime` representan la hora " "local y este método se basa en la función de plataforma C :c:func:`mktime` " "para realizar la conversión. Dado que :class:`.datetime` admite un rango de " "valores más amplio que :c:func:`mktime` en muchas plataformas, este método " "puede lanzar :exc:`OverflowError` para tiempos lejanos en el pasado o en el " "futuro." #: ../Doc/library/datetime.rst:1376 msgid "" "For aware :class:`.datetime` instances, the return value is computed as::" msgstr "" "Para las instancias de :class:`.datetime`, el valor de retorno se calcula " "como::" #: ../Doc/library/datetime.rst:1383 msgid "" "The :meth:`timestamp` method uses the :attr:`.fold` attribute to " "disambiguate the times during a repeated interval." msgstr "" "El método :meth:`timestamp` utiliza el atributo :attr:`.fold` para " "desambiguar los tiempos durante un intervalo repetido." #: ../Doc/library/datetime.rst:1389 msgid "" "There is no method to obtain the POSIX timestamp directly from a naive :" "class:`.datetime` instance representing UTC time. If your application uses " "this convention and your system timezone is not set to UTC, you can obtain " "the POSIX timestamp by supplying ``tzinfo=timezone.utc``::" msgstr "" "No hay ningún método para obtener la marca de tiempo (*timestamp*) POSIX " "directamente de una instancia naíf :class:`.datetime` que representa la hora " "UTC. Si su aplicación utiliza esta convención y la zona horaria de su " "sistema no está configurada en UTC, puede obtener la marca de tiempo POSIX " "al proporcionar ``tzinfo = timezone.utc``::" #: ../Doc/library/datetime.rst:1397 msgid "or by calculating the timestamp directly::" msgstr "o calculando la marca de tiempo (*timestamp*) directamente::" #: ../Doc/library/datetime.rst:1403 msgid "" "Return the day of the week as an integer, where Monday is 0 and Sunday is 6. " "The same as ``self.date().weekday()``. See also :meth:`isoweekday`." msgstr "" "Retorna el día de la semana como un entero, donde el lunes es 0 y el domingo " "es 6. Lo mismo que ``self.date().weekday()``. Ver también :meth:`isoweekday`." #: ../Doc/library/datetime.rst:1409 msgid "" "Return the day of the week as an integer, where Monday is 1 and Sunday is 7. " "The same as ``self.date().isoweekday()``. See also :meth:`weekday`, :meth:" "`isocalendar`." msgstr "" "Retorna el día de la semana como un número entero, donde el lunes es 1 y el " "domingo es 7. Lo mismo que ``self.date().isoweekday()``. Ver también :meth:" "`weekday`, :meth:`isocalendar`." #: ../Doc/library/datetime.rst:1416 msgid "" "Return a :term:`named tuple` with three components: ``year``, ``week`` and " "``weekday``. The same as ``self.date().isocalendar()``." msgstr "" "Retorna una :term:`named tuple` con tres componentes: ``year``, ``week``, y " "``weekday``. Lo mismo que ``self.date().isocalendar()``." #: ../Doc/library/datetime.rst:1422 msgid "Return a string representing the date and time in ISO 8601 format:" msgstr "" "Retorna una cadena de caracteres representando la fecha y la hora en formato " "ISO 8601:" #: ../Doc/library/datetime.rst:1424 msgid "``YYYY-MM-DDTHH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``YYYY-MM-DDTHH:MM:SS.ffffff``, si :attr:`microsecond` no es 0" #: ../Doc/library/datetime.rst:1425 msgid "``YYYY-MM-DDTHH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``YYYY-MM-DDTHH:MM:SS``, si :attr:`microsecond` es 0" #: ../Doc/library/datetime.rst:1427 msgid "" "If :meth:`utcoffset` does not return ``None``, a string is appended, giving " "the UTC offset:" msgstr "" "Si :meth:`utcoffset` no retorna ``None``, se agrega una cadena de caracteres " "dando el desplazamiento UTC:" #: ../Doc/library/datetime.rst:1430 msgid "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` " "is not 0" msgstr "" "``YYYY-MM-DDTHH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` " "no es 0" #: ../Doc/library/datetime.rst:1432 msgid "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0" msgstr "" "``YYYY-MM-DDTHH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` es 0" #: ../Doc/library/datetime.rst:1442 msgid "" "The optional argument *sep* (default ``'T'``) is a one-character separator, " "placed between the date and time portions of the result. For example::" msgstr "" "El argumento opcional *sep* (default ``’T’``) es un separador de un " "carácter, ubicado entre las porciones de fecha y hora del resultado. Por " "ejemplo::" #: ../Doc/library/datetime.rst:1456 ../Doc/library/datetime.rst:1828 msgid "" "The optional argument *timespec* specifies the number of additional " "components of the time to include (the default is ``'auto'``). It can be one " "of the following:" msgstr "" "El argumento opcional *timespec* especifica el número de componentes " "adicionales del tiempo a incluir (el valor predeterminado es ``‘auto’``). " "Puede ser uno de los siguientes:" #: ../Doc/library/datetime.rst:1460 ../Doc/library/datetime.rst:1832 msgid "" "``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as " "``'microseconds'`` otherwise." msgstr "" "``’auto’``: Igual que ``’seconds’`` si :attr:`microsecond` es 0, igual que " "``’microseconds’`` de lo contrario." #: ../Doc/library/datetime.rst:1462 ../Doc/library/datetime.rst:1834 msgid "``'hours'``: Include the :attr:`hour` in the two-digit ``HH`` format." msgstr "" "``’hours’``: incluye el :attr:`hour` en el formato de dos dígitos ``HH``." #: ../Doc/library/datetime.rst:1463 ../Doc/library/datetime.rst:1835 msgid "" "``'minutes'``: Include :attr:`hour` and :attr:`minute` in ``HH:MM`` format." msgstr "" "``’minutes’``: Incluye :attr:`hour` y :attr:`minute` en formato``HH:MM``." #: ../Doc/library/datetime.rst:1464 ../Doc/library/datetime.rst:1836 msgid "" "``'seconds'``: Include :attr:`hour`, :attr:`minute`, and :attr:`second` in " "``HH:MM:SS`` format." msgstr "" "``’seconds’``: Incluye :attr:`hour`, :attr:`minute`, y :attr:`second` en " "formato ``HH:MM:SS``." #: ../Doc/library/datetime.rst:1466 ../Doc/library/datetime.rst:1838 msgid "" "``'milliseconds'``: Include full time, but truncate fractional second part " "to milliseconds. ``HH:MM:SS.sss`` format." msgstr "" "``’milliseconds’``: Incluye tiempo completo, pero trunca la segunda parte " "fraccionaria a milisegundos. Formato ``HH:MM:SS.sss``." #: ../Doc/library/datetime.rst:1468 ../Doc/library/datetime.rst:1840 msgid "``'microseconds'``: Include full time in ``HH:MM:SS.ffffff`` format." msgstr "" "``’microseconds’``: Incluye tiempo completo en formato``HH:MM:SS.ffffff``." #: ../Doc/library/datetime.rst:1472 ../Doc/library/datetime.rst:1844 msgid "Excluded time components are truncated, not rounded." msgstr "Los componentes de tiempo excluidos están truncados, no redondeados." #: ../Doc/library/datetime.rst:1474 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument::" msgstr ":exc:`ValueError` lanzará un argumento inválido *timespec*::" #: ../Doc/library/datetime.rst:1484 ../Doc/library/datetime.rst:1859 msgid "Added the *timespec* argument." msgstr "Se agregó el argumento *timespec*." #: ../Doc/library/datetime.rst:1490 msgid "" "For a :class:`.datetime` instance *d*, ``str(d)`` is equivalent to ``d." "isoformat(' ')``." msgstr "" "Para una instancia de la :class:`.datetime` *d*, ``str(d)`` es equivalente a " "``d.isoformat(' ')``." #: ../Doc/library/datetime.rst:1496 msgid "Return a string representing the date and time::" msgstr "Retorna una cadena de caracteres que representa la fecha y la hora::" #: ../Doc/library/datetime.rst:1502 msgid "" "The output string will *not* include time zone information, regardless of " "whether the input is aware or naive." msgstr "" "La cadena de salida *no* incluirá información de zona horaria, " "independientemente de si la entrada es consciente (*aware*) o naíf (*naive*)." #: ../Doc/library/datetime.rst:1509 msgid "" "on platforms where the native C :c:func:`ctime` function (which :func:`time." "ctime` invokes, but which :meth:`datetime.ctime` does not invoke) conforms " "to the C standard." msgstr "" "en plataformas donde la función nativa C :c:func:`ctime` (que :func:`time." "ctime` invoca, pero que :meth:`datetime.ctime` no invoca) se ajusta al " "estándar *C*." #: ../Doc/library/datetime.rst:1515 msgid "" "Return a string representing the date and time, controlled by an explicit " "format string. For a complete list of formatting directives, see :ref:" "`strftime-strptime-behavior`." msgstr "" "Retorna una cadena de caracteres que representa la fecha y la hora, " "controlada por una cadena de formato explícito. Para obtener una lista " "completa de las directivas de formato, consulte :ref:`strftime-strptime-" "behavior`." #: ../Doc/library/datetime.rst:1522 msgid "" "Same as :meth:`.datetime.strftime`. This makes it possible to specify a " "format string for a :class:`.datetime` object in :ref:`formatted string " "literals ` and when using :meth:`str.format`. For a complete list " "of formatting directives, see :ref:`strftime-strptime-behavior`." msgstr "" "Igual que :meth:`.date.strftime`. Esto hace posible especificar una cadena " "de formato para un objeto :class:`.date` en :ref:`literales de cadena con " "formato ` y cuando se usa :meth:`str.format`. Para obtener una " "lista completa de las directivas de formato, consulte :ref:`strftime-" "strptime-behavior`." #: ../Doc/library/datetime.rst:1529 msgid "Examples of Usage: :class:`.datetime`" msgstr "Ejemplos de uso: :class:`.datetime`" #: ../Doc/library/datetime.rst:1531 msgid "Examples of working with :class:`~datetime.datetime` objects:" msgstr "Ejemplos de trabajo con objetos :class:`~datetime.datetime`:" #: ../Doc/library/datetime.rst:1584 msgid "" "The example below defines a :class:`tzinfo` subclass capturing time zone " "information for Kabul, Afghanistan, which used +4 UTC until 1945 and then " "+4:30 UTC thereafter::" msgstr "" "El siguiente ejemplo define una subclase :class:`tzinfo` que captura la " "información de zona horaria de *Kabul*, Afganistán, que utilizó +4 UTC hasta " "1945 y +4:30 UTC a partir de entonces::" #: ../Doc/library/datetime.rst:1631 msgid "Usage of ``KabulTz`` from above::" msgstr "Uso de ``KabulTz`` desde arriba ::" #: ../Doc/library/datetime.rst:1657 msgid ":class:`.time` Objects" msgstr "Objetos :class:`.time`" #: ../Doc/library/datetime.rst:1659 msgid "" "A :class:`time` object represents a (local) time of day, independent of any " "particular day, and subject to adjustment via a :class:`tzinfo` object." msgstr "" "Un objeto :class:`time` representa a una hora del día (local), independiente " "de cualquier día en particular, y está sujeto a ajustes a través de un " "objeto :class:`tzinfo`." #: ../Doc/library/datetime.rst:1664 msgid "" "All arguments are optional. *tzinfo* may be ``None``, or an instance of a :" "class:`tzinfo` subclass. The remaining arguments must be integers in the " "following ranges:" msgstr "" "Todos los argumentos son opcionales. *tzinfo* puede ser ``None``, o una " "instancia de una subclase :class:`tzinfo`. Los argumentos restantes deben " "ser enteros en los siguientes rangos:" #: ../Doc/library/datetime.rst:1674 msgid "" "If an argument outside those ranges is given, :exc:`ValueError` is raised. " "All default to ``0`` except *tzinfo*, which defaults to :const:`None`." msgstr "" "Si se proporciona un argumento fuera de esos rangos, se genera :exc:" "`ValueError`. Todo predeterminado a ``0`` excepto *tzinfo*, que por defecto " "es :const:`None`." #: ../Doc/library/datetime.rst:1682 msgid "The earliest representable :class:`.time`, ``time(0, 0, 0, 0)``." msgstr "El primero representable :class:`.time`,``time (0, 0, 0, 0)``." #: ../Doc/library/datetime.rst:1687 msgid "The latest representable :class:`.time`, ``time(23, 59, 59, 999999)``." msgstr "El último representable :class:`.time`, ``time(23, 59, 59, 999999)``." #: ../Doc/library/datetime.rst:1692 msgid "" "The smallest possible difference between non-equal :class:`.time` objects, " "``timedelta(microseconds=1)``, although note that arithmetic on :class:`." "time` objects is not supported." msgstr "" "La diferencia más pequeña posible entre los objetos no iguales :class:`." "time`, ``timedelta(microseconds=1)``, aunque tenga en cuenta que la " "aritmética en objetos :class:`.time` no es compatible." #: ../Doc/library/datetime.rst:1721 msgid "" "The object passed as the tzinfo argument to the :class:`.time` constructor, " "or ``None`` if none was passed." msgstr "" "El objeto pasado como argumento *tzinfo* al constructor de la clase :class:`." "time` , o ``None`` si no se pasó ninguno." #: ../Doc/library/datetime.rst:1735 msgid "" ":class:`.time` objects support comparison of :class:`.time` to :class:`." "time`, where *a* is considered less than *b* when *a* precedes *b* in time. " "If one comparand is naive and the other is aware, :exc:`TypeError` is raised " "if an order comparison is attempted. For equality comparisons, naive " "instances are never equal to aware instances." msgstr "" "Los objetos :class:`.time` admiten la comparación de :class:`.time` con :" "class:`.time`, donde *a* se considera menor que *b* cuando *a* precede a *b* " "en el tiempo. Si un elemento comparado es naíf (*naive*) y el otro lo sabe " "se genera :exc:`TypeError` si se intenta una comparación de orden. Para las " "comparaciones de igualdad, las instancias naíf nunca son iguales a las " "instancias conscientes (*aware*)." #: ../Doc/library/datetime.rst:1741 msgid "" "If both comparands are aware, and have the same :attr:`~time.tzinfo` " "attribute, the common :attr:`~time.tzinfo` attribute is ignored and the base " "times are compared. If both comparands are aware and have different :attr:" "`~time.tzinfo` attributes, the comparands are first adjusted by subtracting " "their UTC offsets (obtained from ``self.utcoffset()``). In order to stop " "mixed-type comparisons from falling back to the default comparison by object " "address, when a :class:`.time` object is compared to an object of a " "different type, :exc:`TypeError` is raised unless the comparison is ``==`` " "or ``!=``. The latter cases return :const:`False` or :const:`True`, " "respectively." msgstr "" "Si ambos elementos comparados son conscientes (*aware*) y tienen el mismo " "atributo :attr:`~time.tzinfo`, el atributo común :attr:`~time.tzinfo` se " "ignora y se comparan los tiempos base. Si ambos elementos comparados son " "conscientes y tienen atributos diferentes :attr:`~time.tzinfo`, los " "elementos comparados se ajustan primero restando sus compensaciones UTC " "(obtenidas de ``self.utcoffset()``). Para evitar que las comparaciones de " "tipos mixtos vuelvan a la comparación predeterminada por dirección de " "objeto, cuando un objeto :class:`.time` se compara con un objeto de un tipo " "diferente, se genera :exc:`TypeError` a menos que la comparación es ``==`` o " "``!=``. Los últimos casos retornan :const:`False` o :const:`True`, " "respectivamente." #: ../Doc/library/datetime.rst:1751 msgid "" "Equality comparisons between aware and naive :class:`~datetime.time` " "instances don't raise :exc:`TypeError`." msgstr "" "Las comparaciones de igualdad entre las instancias conscientes (*aware*) y " "naífs (*naive*) :class:`~datetime.time` no generan :exc:`TypeError`." #: ../Doc/library/datetime.rst:1755 msgid "" "In Boolean contexts, a :class:`.time` object is always considered to be true." msgstr "" "En contextos booleanos, un objeto :class:`.time` siempre se considera " "verdadero." #: ../Doc/library/datetime.rst:1757 msgid "" "Before Python 3.5, a :class:`.time` object was considered to be false if it " "represented midnight in UTC. This behavior was considered obscure and error-" "prone and has been removed in Python 3.5. See :issue:`13936` for full " "details." msgstr "" "Antes de Python 3.5, un objeto :class:`.time` se consideraba falso si " "representaba la medianoche en UTC. Este comportamiento se consideró oscuro y " "propenso a errores y se ha eliminado en Python 3.5. Ver :issue:`13936` para " "más detalles." #: ../Doc/library/datetime.rst:1764 msgid "Other constructor:" msgstr "Otro constructor:" #: ../Doc/library/datetime.rst:1768 #, fuzzy msgid "" "Return a :class:`.time` corresponding to a *time_string* in any valid ISO " "8601 format, with the following exceptions:" msgstr "" "Retorna :class:`.datetime` correspondiente a *date_string*, analizado según " "*format*." #: ../Doc/library/datetime.rst:1772 msgid "" "The leading ``T``, normally required in cases where there may be ambiguity " "between a date and a time, is not required." msgstr "" #: ../Doc/library/datetime.rst:1774 msgid "" "Fractional seconds may have any number of digits (anything beyond 6 will be " "truncated)." msgstr "" #: ../Doc/library/datetime.rst:1800 msgid "" "Previously, this method only supported formats that could be emitted by :" "meth:`time.isoformat()`." msgstr "" #: ../Doc/library/datetime.rst:1810 msgid "" "Return a :class:`.time` with the same value, except for those attributes " "given new values by whichever keyword arguments are specified. Note that " "``tzinfo=None`` can be specified to create a naive :class:`.time` from an " "aware :class:`.time`, without conversion of the time data." msgstr "" "Retorna una :class:`.time` con el mismo valor, excepto para aquellos " "atributos a los que se les otorgan nuevos valores según los argumentos de " "palabras clave especificados. Tenga en cuenta que ``tzinfo = None`` se puede " "especificar para crear una :class:`.time` naíf (*naive*) desde un consciente " "(*aware*) :class:`.time`, sin conversión de los datos de tiempo." #: ../Doc/library/datetime.rst:1821 msgid "Return a string representing the time in ISO 8601 format, one of:" msgstr "Retorna una cadena que representa la hora en formato ISO 8601, una de:" #: ../Doc/library/datetime.rst:1823 msgid "``HH:MM:SS.ffffff``, if :attr:`microsecond` is not 0" msgstr "``HH:MM:SS.ffffff``, si :attr:`microsecond` no es 0" #: ../Doc/library/datetime.rst:1824 msgid "``HH:MM:SS``, if :attr:`microsecond` is 0" msgstr "``HH:MM:SS``, si :attr:`microsecond` es 0" #: ../Doc/library/datetime.rst:1825 msgid "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, if :meth:`utcoffset` does not " "return ``None``" msgstr "" "``HH:MM:SS.ffffff+HH:MM[:SS[.ffffff]]``, si :meth:`utcoffset` no retorna " "``None``" #: ../Doc/library/datetime.rst:1826 msgid "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, if :attr:`microsecond` is 0 and :meth:" "`utcoffset` does not return ``None``" msgstr "" "``HH:MM:SS+HH:MM[:SS[.ffffff]]``, si :attr:`microsecond` es 0 y :meth:" "`utcoffset` no retorna ``None``" #: ../Doc/library/datetime.rst:1846 msgid ":exc:`ValueError` will be raised on an invalid *timespec* argument." msgstr ":exc:`ValueError` lanzará un argumento inválido *timespec*." #: ../Doc/library/datetime.rst:1865 msgid "For a time *t*, ``str(t)`` is equivalent to ``t.isoformat()``." msgstr "Durante un tiempo *t*, ``str(t)`` es equivalente a ``t.isoformat()``." #: ../Doc/library/datetime.rst:1870 msgid "" "Return a string representing the time, controlled by an explicit format " "string. For a complete list of formatting directives, see :ref:`strftime-" "strptime-behavior`." msgstr "" "Retorna una cadena que representa la hora, controlada por una cadena de " "formato explícito. Para obtener una lista completa de las directivas de " "formato, consulte :ref:`strftime-strptime-behavior`." #: ../Doc/library/datetime.rst:1877 msgid "" "Same as :meth:`.time.strftime`. This makes it possible to specify a format " "string for a :class:`.time` object in :ref:`formatted string literals ` and when using :meth:`str.format`. For a complete list of " "formatting directives, see :ref:`strftime-strptime-behavior`." msgstr "" "Igual que :meth:`.time.strftime`. Esto permite especificar una cadena de " "formato para un objeto :class:`.time` en :ref:`cadenas de caracteres " "literales con formato ` y cuando se usa :meth:`str.format`. Para " "obtener una lista completa de las directivas de formato, consulte :ref:" "`strftime-strptime-behavior`." #: ../Doc/library/datetime.rst:1886 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "utcoffset(None)``, and raises an exception if the latter doesn't return " "``None`` or a :class:`timedelta` object with magnitude less than one day." msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, sino retorna ``self.tzinfo." "utcoffset(None)``, y genera una excepción si este último no retorna ``None`` " "o un objeto de :class:`timedelta` con magnitud inferior a un día." #: ../Doc/library/datetime.rst:1896 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "dst(None)``, and raises an exception if the latter doesn't return ``None``, " "or a :class:`timedelta` object with magnitude less than one day." msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, sino retorna ``self.tzinfo." "utcoffset(None)``, y genera una excepción si este último no retorna " "``None``, o un objeto de :class:`timedelta` con magnitud inferior a un día." #: ../Doc/library/datetime.rst:1905 msgid "" "If :attr:`.tzinfo` is ``None``, returns ``None``, else returns ``self.tzinfo." "tzname(None)``, or raises an exception if the latter doesn't return ``None`` " "or a string object." msgstr "" "Si :attr:`.tzinfo` es ``None``, retorna ``None``, sino retorna ``self.tzinfo." "tzname(None)``, o genera una excepción si este último no retorna ``None`` o " "un objeto de cadena." #: ../Doc/library/datetime.rst:1910 msgid "Examples of Usage: :class:`.time`" msgstr "Ejemplos de uso: :class:`.time`" #: ../Doc/library/datetime.rst:1912 msgid "Examples of working with a :class:`.time` object::" msgstr "Ejemplos de trabajo con el objeto :class:`.time`::" #: ../Doc/library/datetime.rst:1943 msgid ":class:`tzinfo` Objects" msgstr "Objetos :class:`tzinfo`" #: ../Doc/library/datetime.rst:1947 msgid "" "This is an abstract base class, meaning that this class should not be " "instantiated directly. Define a subclass of :class:`tzinfo` to capture " "information about a particular time zone." msgstr "" "Esta es una clase base abstracta, lo que significa que esta clase no debe " "ser instanciada directamente. Defina una subclase de :class:`tzinfo` para " "capturar información sobre una zona horaria particular." #: ../Doc/library/datetime.rst:1951 msgid "" "An instance of (a concrete subclass of) :class:`tzinfo` can be passed to the " "constructors for :class:`.datetime` and :class:`.time` objects. The latter " "objects view their attributes as being in local time, and the :class:" "`tzinfo` object supports methods revealing offset of local time from UTC, " "the name of the time zone, and DST offset, all relative to a date or time " "object passed to them." msgstr "" "Una instancia (de una subclase concreta) :class:`tzinfo` se puede pasar a " "los constructores para objetos de :class:`.datetime` y :class:`.time`. Los " "últimos objetos ven sus atributos como en la hora local, y el objeto :class:" "`tzinfo` admite métodos que revelan el desplazamiento de la hora local desde " "UTC, el nombre de la zona horaria y el desplazamiento DST, todo en relación " "con un objeto de fecha u hora pasó a ellos." #: ../Doc/library/datetime.rst:1957 msgid "" "You need to derive a concrete subclass, and (at least) supply " "implementations of the standard :class:`tzinfo` methods needed by the :class:" "`.datetime` methods you use. The :mod:`datetime` module provides :class:" "`timezone`, a simple concrete subclass of :class:`tzinfo` which can " "represent timezones with fixed offset from UTC such as UTC itself or North " "American EST and EDT." msgstr "" "Debe derivar una subclase concreta y (al menos) proporcionar " "implementaciones de los métodos estándar :class:`tzinfo` que necesitan los " "métodos :class:`.datetime` que utiliza. El módulo :mod:`datetime` " "proporciona :class:`timezone`, una subclase concreta simple de :class:" "`tzinfo` que puede representar zonas horarias con desplazamiento fijo desde " "UTC como UTC o Norte América EST y EDT." #: ../Doc/library/datetime.rst:1964 msgid "" "Special requirement for pickling: A :class:`tzinfo` subclass must have an :" "meth:`__init__` method that can be called with no arguments, otherwise it " "can be pickled but possibly not unpickled again. This is a technical " "requirement that may be relaxed in the future." msgstr "" "Requisito especial para el *pickling*: La subclase :class:`tzinfo` debe " "tener un método :meth:`__init__` que se pueda invocar sin argumentos; de lo " "contrario, se puede hacer *pickling* pero posiblemente no se vuelva a " "despegar. Este es un requisito técnico que puede ser relajado en el futuro." #: ../Doc/library/datetime.rst:1969 msgid "" "A concrete subclass of :class:`tzinfo` may need to implement the following " "methods. Exactly which methods are needed depends on the uses made of aware :" "mod:`datetime` objects. If in doubt, simply implement all of them." msgstr "" "Una subclase concreta de :class:`tzinfo` puede necesitar implementar los " "siguientes métodos. Exactamente qué métodos son necesarios depende de los " "usos de los objetos conscientes(*aware*) :mod:`datetime`. En caso de duda, " "simplemente implemente todos ellos." #: ../Doc/library/datetime.rst:1976 msgid "" "Return offset of local time from UTC, as a :class:`timedelta` object that is " "positive east of UTC. If local time is west of UTC, this should be negative." msgstr "" "Retorna el desplazamiento de la hora local desde UTC, como un objeto :class:" "`timedelta` que es positivo al este de UTC. Si la hora local es al oeste de " "UTC, esto debería ser negativo." #: ../Doc/library/datetime.rst:1979 msgid "" "This represents the *total* offset from UTC; for example, if a :class:" "`tzinfo` object represents both time zone and DST adjustments, :meth:" "`utcoffset` should return their sum. If the UTC offset isn't known, return " "``None``. Else the value returned must be a :class:`timedelta` object " "strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)`` (the " "magnitude of the offset must be less than one day). Most implementations of :" "meth:`utcoffset` will probably look like one of these two::" msgstr "" "Esto representa el desplazamiento *total* de UTC; por ejemplo, si un objeto :" "class:`tzinfo` representa ajustes de zona horaria y DST, :meth:`utcoffset` " "debería retornar su suma. Si no se conoce el desplazamiento UTC, retorna " "``None`` . De lo contrario, el valor detonado debe ser un objeto de :class:" "`timedelta` estrictamente entre ``-timedelta(hours = 24)`` y ``timedelta " "(hours = 24)`` (la magnitud del desplazamiento debe ser inferior a un día) " "La mayoría de las implementaciones de :meth:`utcoffset` probablemente se " "parecerán a una de estas dos::" #: ../Doc/library/datetime.rst:1990 msgid "" "If :meth:`utcoffset` does not return ``None``, :meth:`dst` should not return " "``None`` either." msgstr "" "Si :meth:`utcoffset` no retorna ``None``, :meth:`dst` no debería retornar " "``None`` tampoco." #: ../Doc/library/datetime.rst:1993 msgid "" "The default implementation of :meth:`utcoffset` raises :exc:" "`NotImplementedError`." msgstr "" "La implementación por defecto de :meth:`utcoffset` genera :exc:" "`NotImplementedError`." #: ../Doc/library/datetime.rst:2002 msgid "" "Return the daylight saving time (DST) adjustment, as a :class:`timedelta` " "object or ``None`` if DST information isn't known." msgstr "" "Retorna el ajuste del horario de verano (DST), como un objeto de :class:" "`timedelta` o ``None`` si no se conoce la información de DST." #: ../Doc/library/datetime.rst:2006 msgid "" "Return ``timedelta(0)`` if DST is not in effect. If DST is in effect, return " "the offset as a :class:`timedelta` object (see :meth:`utcoffset` for " "details). Note that DST offset, if applicable, has already been added to the " "UTC offset returned by :meth:`utcoffset`, so there's no need to consult :" "meth:`dst` unless you're interested in obtaining DST info separately. For " "example, :meth:`datetime.timetuple` calls its :attr:`~.datetime.tzinfo` " "attribute's :meth:`dst` method to determine how the :attr:`tm_isdst` flag " "should be set, and :meth:`tzinfo.fromutc` calls :meth:`dst` to account for " "DST changes when crossing time zones." msgstr "" "Retorna ``timedelta(0)`` si el horario de verano no está en vigor. Si DST " "está en vigor, retorna el desplazamiento como un objeto :class:`timedelta` " "(consulte :meth:`utcoffset` para más detalles). Tenga en cuenta que el " "desplazamiento DST, si corresponde, ya se ha agregado al desplazamiento UTC " "retornado por :meth:`utcoffset`, por lo que no es necesario consultar :meth:" "`dst` a menos que esté interesado en obtener información DST por separado. " "Por ejemplo, :meth:`datetime.timetuple` llama a su :attr:`~.datetime.tzinfo` " "del atributo :meth:`dst` para determinar cómo se debe establecer el " "indicador :attr:`tm_isdst`, y :meth:`tzinfo.fromutc` llama :meth:`dst` para " "tener en cuenta los cambios de horario de verano al cruzar zonas horarias." #: ../Doc/library/datetime.rst:2016 msgid "" "An instance *tz* of a :class:`tzinfo` subclass that models both standard and " "daylight times must be consistent in this sense:" msgstr "" "Una instancia *tz* de una subclase :class:`tzinfo` que modela los horarios " "estándar y diurnos debe ser coherente en este sentido:" #: ../Doc/library/datetime.rst:2019 msgid "``tz.utcoffset(dt) - tz.dst(dt)``" msgstr "``tz.utcoffset(dt) - tz.dst(dt)``" #: ../Doc/library/datetime.rst:2021 msgid "" "must return the same result for every :class:`.datetime` *dt* with ``dt." "tzinfo == tz`` For sane :class:`tzinfo` subclasses, this expression yields " "the time zone's \"standard offset\", which should not depend on the date or " "the time, but only on geographic location. The implementation of :meth:" "`datetime.astimezone` relies on this, but cannot detect violations; it's the " "programmer's responsibility to ensure it. If a :class:`tzinfo` subclass " "cannot guarantee this, it may be able to override the default implementation " "of :meth:`tzinfo.fromutc` to work correctly with :meth:`astimezone` " "regardless." msgstr "" "debe retornar el mismo resultado para cada :class:`.datetime` *dt* con ``dt." "tzinfo == tz`` Para las subclases sanas :class:`tzinfo`, esta expresión " "produce el \"desplazamiento estándar\" de la zona horaria, que no debe " "depender de la fecha o la hora, sino solo de la ubicación geográfica. La " "implementación de :meth:`datetime.astimezone` se basa en esto, pero no puede " "detectar violaciones; es responsabilidad del programador asegurarlo. Si una " "subclase :class:`tzinfo` no puede garantizar esto, puede anular la " "implementación predeterminada de :meth:`tzinfo.fromutc` para que funcione " "correctamente con :meth:`astimezone` independientemente." #: ../Doc/library/datetime.rst:2030 msgid "" "Most implementations of :meth:`dst` will probably look like one of these " "two::" msgstr "" "La mayoría de las implementaciones de :meth:`dst` probablemente se parecerán " "a una de estas dos::" #: ../Doc/library/datetime.rst:2036 msgid "or::" msgstr "o::" #: ../Doc/library/datetime.rst:2048 msgid "" "The default implementation of :meth:`dst` raises :exc:`NotImplementedError`." msgstr "" "La implementación predeterminada de :meth:`dst` genera :exc:" "`NotImplementedError`." #: ../Doc/library/datetime.rst:2056 msgid "" "Return the time zone name corresponding to the :class:`.datetime` object " "*dt*, as a string. Nothing about string names is defined by the :mod:" "`datetime` module, and there's no requirement that it mean anything in " "particular. For example, \"GMT\", \"UTC\", \"-500\", \"-5:00\", \"EDT\", " "\"US/Eastern\", \"America/New York\" are all valid replies. Return ``None`` " "if a string name isn't known. Note that this is a method rather than a fixed " "string primarily because some :class:`tzinfo` subclasses will wish to return " "different names depending on the specific value of *dt* passed, especially " "if the :class:`tzinfo` class is accounting for daylight time." msgstr "" "Retorna el nombre de zona horaria correspondiente al objeto :class:`." "datetime` *dt*, como una cadena de caracteres. El módulo :mod:`datetime` no " "define nada sobre los nombres de cadena, y no hay ningún requisito de que " "signifique algo en particular. Por ejemplo,*\"GMT\", \"UTC\", \"-500\", " "\"-5:00\", \"EDT\", \"US/Eastern\"*, *\"America/New York\"* son todas " "respuestas válidas. Retorna ``None`` si no se conoce un nombre de cadena. " "Tenga en cuenta que este es un método en lugar de una cadena fija " "principalmente porque algunas subclases :class:`tzinfo` desearán retornar " "diferentes nombres dependiendo del valor específico de *dt* pasado, " "especialmente si la clase :class:`tzinfo` es contable para el horario de " "verano." #: ../Doc/library/datetime.rst:2066 msgid "" "The default implementation of :meth:`tzname` raises :exc:" "`NotImplementedError`." msgstr "" "La implementación predeterminada de :meth:`tzname` genera :exc:" "`NotImplementedError`." #: ../Doc/library/datetime.rst:2069 msgid "" "These methods are called by a :class:`.datetime` or :class:`.time` object, " "in response to their methods of the same names. A :class:`.datetime` object " "passes itself as the argument, and a :class:`.time` object passes ``None`` " "as the argument. A :class:`tzinfo` subclass's methods should therefore be " "prepared to accept a *dt* argument of ``None``, or of class :class:`." "datetime`." msgstr "" "Estos métodos son llamados por un objeto :class:`.datetime` o :class:`." "time`, en respuesta a sus métodos con los mismos nombres. El objeto de :" "class:`.datetime` se pasa a sí mismo como argumento, y un objeto :class:`." "time` pasa a ``None`` como argumento. Los métodos de la subclase :class:" "`tzinfo` deben, por lo tanto, estar preparados para aceptar un argumento " "*dt* de ``None``, o de clase :class:`.datetime`." #: ../Doc/library/datetime.rst:2075 msgid "" "When ``None`` is passed, it's up to the class designer to decide the best " "response. For example, returning ``None`` is appropriate if the class wishes " "to say that time objects don't participate in the :class:`tzinfo` protocols. " "It may be more useful for ``utcoffset(None)`` to return the standard UTC " "offset, as there is no other convention for discovering the standard offset." msgstr "" "Cuando se pasa ``None``, corresponde al diseñador de la clase decidir la " "mejor respuesta. Por ejemplo, retornar ``None`` es apropiado si la clase " "desea decir que los objetos de tiempo no participan en los protocolos :class:" "`tzinfo`. Puede ser más útil que ``utcoffset(None)`` retorne el " "desplazamiento UTC estándar, ya que no existe otra convención para descubrir " "el desplazamiento estándar." #: ../Doc/library/datetime.rst:2081 msgid "" "When a :class:`.datetime` object is passed in response to a :class:`." "datetime` method, ``dt.tzinfo`` is the same object as *self*. :class:" "`tzinfo` methods can rely on this, unless user code calls :class:`tzinfo` " "methods directly. The intent is that the :class:`tzinfo` methods interpret " "*dt* as being in local time, and not need worry about objects in other " "timezones." msgstr "" "Cuando se pasa un objeto :class:`.datetime` en respuesta a un método :class:" "`.datetime`, ``dt.tzinfo`` es el mismo objeto que *self*. :class:`tzinfo` " "los métodos pueden confiar en esto, a menos que el código del usuario llame :" "class:`tzinfo` métodos directamente. La intención es que los métodos :class:" "`tzinfo` interpreten *dt* como si estuvieran en la hora local, y no " "necesiten preocuparse por los objetos en otras zonas horarias." #: ../Doc/library/datetime.rst:2087 msgid "" "There is one more :class:`tzinfo` method that a subclass may wish to " "override:" msgstr "" "Hay un método más :class:`tzinfo` que una subclase puede desear anular:" #: ../Doc/library/datetime.rst:2092 msgid "" "This is called from the default :class:`datetime.astimezone()` " "implementation. When called from that, ``dt.tzinfo`` is *self*, and *dt*'s " "date and time data are to be viewed as expressing a UTC time. The purpose " "of :meth:`fromutc` is to adjust the date and time data, returning an " "equivalent datetime in *self*'s local time." msgstr "" "Esto se llama desde la implementación predeterminada :class:`datetime." "astimezone()`. Cuando se llama desde eso, ``dt.tzinfo`` es *self* , y los " "datos de fecha y hora de *dt* deben considerarse como una hora UTC. El " "propósito de :meth:`fromutc` es ajustar los datos de fecha y hora, " "retornando una fecha y hora equivalente en la hora local de *self*." #: ../Doc/library/datetime.rst:2098 msgid "" "Most :class:`tzinfo` subclasses should be able to inherit the default :meth:" "`fromutc` implementation without problems. It's strong enough to handle " "fixed-offset time zones, and time zones accounting for both standard and " "daylight time, and the latter even if the DST transition times differ in " "different years. An example of a time zone the default :meth:`fromutc` " "implementation may not handle correctly in all cases is one where the " "standard offset (from UTC) depends on the specific date and time passed, " "which can happen for political reasons. The default implementations of :meth:" "`astimezone` and :meth:`fromutc` may not produce the result you want if the " "result is one of the hours straddling the moment the standard offset changes." msgstr "" "La mayoría de las subclases :class:`tzinfo` deberían poder heredar la " "implementación predeterminada :meth:`fromutc` sin problemas. Es lo " "suficientemente fuerte como para manejar zonas horarias de desplazamiento " "fijo y zonas horarias que representan tanto el horario estándar como el " "horario de verano, y esto último incluso si los tiempos de transición DST " "difieren en años diferentes. Un ejemplo de una zona horaria predeterminada :" "meth:`fromutc`, la implementación puede que no se maneje correctamente en " "todos los casos es aquella en la que el desplazamiento estándar (desde UTC) " "depende de la fecha y hora específicas que pasan, lo que puede suceder por " "razones políticas. Las implementaciones predeterminadas de :meth:" "`astimezone` y :meth:`fromutc` pueden no producir el resultado que desea si " "el resultado es una de las horas a horcajadas en el momento en que cambia el " "desplazamiento estándar." #: ../Doc/library/datetime.rst:2109 msgid "" "Skipping code for error cases, the default :meth:`fromutc` implementation " "acts like::" msgstr "" "Código de omisión para casos de error, el valor predeterminado :meth:" "`fromutc` la implementación actúa como ::" #: ../Doc/library/datetime.rst:2127 msgid "" "In the following :download:`tzinfo_examples.py <../includes/tzinfo_examples." "py>` file there are some examples of :class:`tzinfo` classes:" msgstr "" "En el siguiente archivo :download:`tzinfo_examples.py <../includes/" "tzinfo_examples.py>` hay algunos ejemplos de clases :class:`tzinfo`:" #: ../Doc/library/datetime.rst:2133 msgid "" "Note that there are unavoidable subtleties twice per year in a :class:" "`tzinfo` subclass accounting for both standard and daylight time, at the DST " "transition points. For concreteness, consider US Eastern (UTC -0500), where " "EDT begins the minute after 1:59 (EST) on the second Sunday in March, and " "ends the minute after 1:59 (EDT) on the first Sunday in November::" msgstr "" "Tenga en cuenta que hay sutilezas inevitables dos veces al año en una " "subclase :class:`tzinfo` que representa tanto el horario estándar como el " "horario de verano, en los puntos de transición DST. Para mayor concreción, " "considere *US Eastern* (UTC -0500), donde EDT comienza el minuto después de " "1:59 (EST) el segundo domingo de marzo y termina el minuto después de 1:59 " "(EDT) el primer domingo de noviembre ::" #: ../Doc/library/datetime.rst:2147 msgid "" "When DST starts (the \"start\" line), the local wall clock leaps from 1:59 " "to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, " "so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the " "day DST begins. For example, at the Spring forward transition of 2016, we " "get::" msgstr "" "Cuando comienza el horario de verano (la línea de \"inicio\"),tiempo real " "transcurrido (*wall time*) salta de 1:59 a 3:00. Un tiempo de pared de la " "forma 2: MM realmente no tiene sentido ese día, por lo que ``astimezone " "(Eastern)`` no entregará un resultado con ``hour == 2`` el día en que " "comienza el horario de verano. Por ejemplo, en la transición de primavera de " "2016, obtenemos ::" #: ../Doc/library/datetime.rst:2166 msgid "" "When DST ends (the \"end\" line), there's a potentially worse problem: " "there's an hour that can't be spelled unambiguously in local wall time: the " "last hour of daylight time. In Eastern, that's times of the form 5:MM UTC on " "the day daylight time ends. The local wall clock leaps from 1:59 (daylight " "time) back to 1:00 (standard time) again. Local times of the form 1:MM are " "ambiguous. :meth:`astimezone` mimics the local clock's behavior by mapping " "two adjacent UTC hours into the same local hour then. In the Eastern " "example, UTC times of the form 5:MM and 6:MM both map to 1:MM when converted " "to Eastern, but earlier times have the :attr:`~datetime.fold` attribute set " "to 0 and the later times have it set to 1. For example, at the Fall back " "transition of 2016, we get::" msgstr "" "Cuando finaliza el horario de verano (la línea \"final\"), hay un problema " "potencialmente peor: hay una hora que no se puede deletrear sin ambigüedades " "en el tiempo de la pared local: la última hora del día. En el Este, esos son " "los tiempos de la forma 5:MM UTC en el día en que termina el horario de " "verano. El reloj de pared local salta de 1:59 (hora del día) a la 1:00 (hora " "estándar) nuevamente. Horas locales de la forma 1:MM son ambiguas. :meth:" "`astimezone` imita el comportamiento del reloj local al mapear dos horas UTC " "adyacentes en la misma hora local. En el ejemplo oriental, los tiempos UTC " "de la forma 5: MM y 6: MM se correlacionan con 1:MM cuando se convierten en " "oriental, pero los tiempos anteriores tienen el atributo :attr:`~datetime." "fold` establecido en 0 y los tiempos posteriores configúrelo en 1. Por " "ejemplo, en la transición alternativa de 2016, obtenemos::" #: ../Doc/library/datetime.rst:2188 msgid "" "Note that the :class:`.datetime` instances that differ only by the value of " "the :attr:`~datetime.fold` attribute are considered equal in comparisons." msgstr "" "Tenga en cuenta que las instancias :class:`.datetime` que difieren solo por " "el valor del atributo :attr:`~datetime.fold` se consideran iguales en las " "comparaciones." #: ../Doc/library/datetime.rst:2191 msgid "" "Applications that can't bear wall-time ambiguities should explicitly check " "the value of the :attr:`~datetime.fold` attribute or avoid using hybrid :" "class:`tzinfo` subclasses; there are no ambiguities when using :class:" "`timezone`, or any other fixed-offset :class:`tzinfo` subclass (such as a " "class representing only EST (fixed offset -5 hours), or only EDT (fixed " "offset -4 hours))." msgstr "" "Las aplicaciones que no pueden soportar ambigüedades de tiempo real (*wall " "time*) deben verificar explícitamente el valor del atributo :attr:`~datetime." "fold` o evitar el uso de las subclases híbridas :class:`tzinfo`; no existen " "ambigüedades cuando se utiliza :class:`timezone`, o cualquier otra subclase " "de clase offset :class:`tzinfo` (como una clase que representa solo *EST* " "(desplazamiento fijo -5 horas), o solo EDT (desplazamiento fijo -4 horas))." #: ../Doc/library/datetime.rst:2205 msgid ":mod:`zoneinfo`" msgstr "" #: ../Doc/library/datetime.rst:2200 msgid "" "The :mod:`datetime` module has a basic :class:`timezone` class (for handling " "arbitrary fixed offsets from UTC) and its :attr:`timezone.utc` attribute (a " "UTC timezone instance)." msgstr "" "El módulo :mod:`datetime` tiene una clase básica :class:`timezone` (para " "manejar compensaciones fijas arbitrarias desde UTC) y su atributo :attr:" "`timezone.utc` (una instancia de zona horaria UTC)." #: ../Doc/library/datetime.rst:2204 #, fuzzy msgid "" "``zoneinfo`` brings the *IANA timezone database* (also known as the Olson " "database) to Python, and its usage is recommended." msgstr "" "La biblioteca *dateutil.tz* trae la *IANA timezone database* (también " "conocida como la base de datos *Olson*) a Python, y se recomienda su uso." #: ../Doc/library/datetime.rst:2211 msgid "`IANA timezone database `_" msgstr "`IANA timezone database `_" #: ../Doc/library/datetime.rst:2208 msgid "" "The Time Zone Database (often called tz, tzdata or zoneinfo) contains code " "and data that represent the history of local time for many representative " "locations around the globe. It is updated periodically to reflect changes " "made by political bodies to time zone boundaries, UTC offsets, and daylight-" "saving rules." msgstr "" "La base de datos de zonas horarias (a menudo llamada *tz, tzdata o " "zoneinfo*) contiene código y datos que representan el historial de la hora " "local de muchos lugares representativos de todo el mundo. Se actualiza " "periódicamente para reflejar los cambios realizados por los cuerpos " "políticos en los límites de la zona horaria, las compensaciones UTC y las " "reglas de horario de verano." #: ../Doc/library/datetime.rst:2218 msgid ":class:`timezone` Objects" msgstr "Objetos :class:`timezone`" #: ../Doc/library/datetime.rst:2220 msgid "" "The :class:`timezone` class is a subclass of :class:`tzinfo`, each instance " "of which represents a timezone defined by a fixed offset from UTC." msgstr "" "La clase :class:`timezone` es una subclase de :class:`tzinfo`, cada una de " "las cuales representa una zona horaria definida por un desplazamiento fijo " "desde UTC." #: ../Doc/library/datetime.rst:2224 msgid "" "Objects of this class cannot be used to represent timezone information in " "the locations where different offsets are used in different days of the year " "or where historical changes have been made to civil time." msgstr "" "Los objetos de esta clase no se pueden usar para representar la información " "de zona horaria en los lugares donde se usan diferentes desplazamientos en " "diferentes días del año o donde se han realizado cambios históricos en la " "hora civil." #: ../Doc/library/datetime.rst:2231 msgid "" "The *offset* argument must be specified as a :class:`timedelta` object " "representing the difference between the local time and UTC. It must be " "strictly between ``-timedelta(hours=24)`` and ``timedelta(hours=24)``, " "otherwise :exc:`ValueError` is raised." msgstr "" "El argumento *offset* debe especificarse como un objeto de :class:" "`timedelta` que representa la diferencia entre la hora local y UTC. Debe " "estar estrictamente entre ``-timedelta(horas = 24)`` y ``timedelta(horas = " "24)``, de lo contrario :exc:`ValueError` se genera." #: ../Doc/library/datetime.rst:2236 msgid "" "The *name* argument is optional. If specified it must be a string that will " "be used as the value returned by the :meth:`datetime.tzname` method." msgstr "" "El argumento *name* es opcional. Si se especifica, debe ser una cadena de " "caracteres que se utilizará como el valor retornado por el método :meth:" "`datetime.tzname`." #: ../Doc/library/datetime.rst:2247 ../Doc/library/datetime.rst:2258 msgid "" "Return the fixed value specified when the :class:`timezone` instance is " "constructed." msgstr "" "Retorna el valor fijo especificado cuando se construye la instancia :class:" "`timezone`." #: ../Doc/library/datetime.rst:2250 msgid "" "The *dt* argument is ignored. The return value is a :class:`timedelta` " "instance equal to the difference between the local time and UTC." msgstr "" "El argumento *dt* se ignora. El valor de retorno es una instancia de :class:" "`timedelta` igual a la diferencia entre la hora local y UTC." #: ../Doc/library/datetime.rst:2261 msgid "" "If *name* is not provided in the constructor, the name returned by " "``tzname(dt)`` is generated from the value of the ``offset`` as follows. If " "*offset* is ``timedelta(0)``, the name is \"UTC\", otherwise it is a string " "in the format ``UTC±HH:MM``, where ± is the sign of ``offset``, HH and MM " "are two digits of ``offset.hours`` and ``offset.minutes`` respectively." msgstr "" "Si no se proporciona *name* en el constructor, el nombre retornado por " "``tzname(dt)`` se genera a partir del valor del ``offset`` de la siguiente " "manera. Si *offset* es ``timedelta (0)``, el nombre es \"UTC\", de lo " "contrario es una cadena en el formato ``UTC ±``, donde ± es el signo de " "``offset``, HH y MM son dos dígitos de ``offset.hours`` y ``offset.minutes`` " "respectivamente." #: ../Doc/library/datetime.rst:2267 #, fuzzy msgid "" "Name generated from ``offset=timedelta(0)`` is now plain ``'UTC'``, not " "``'UTC+00:00'``." msgstr "" "El nombre generado a partir de ``offset = timedelta (0)`` ahora es simple `` " "UTC``, no ``‘UTC+00:00’``." #: ../Doc/library/datetime.rst:2274 msgid "Always returns ``None``." msgstr "Siempre retorna ``None``." #: ../Doc/library/datetime.rst:2278 msgid "" "Return ``dt + offset``. The *dt* argument must be an aware :class:`." "datetime` instance, with ``tzinfo`` set to ``self``." msgstr "" "Retorna ``dt + offset``. El argumento *dt* debe ser una instancia consciente " "(*aware*) :class:`.datetime`, con` `tzinfo`` establecido en``self``." #: ../Doc/library/datetime.rst:2285 msgid "The UTC timezone, ``timezone(timedelta(0))``." msgstr "La zona horaria UTC, ``timezone(timedelta(0))``." #: ../Doc/library/datetime.rst:2294 msgid ":meth:`strftime` and :meth:`strptime` Behavior" msgstr "Comportamiento :meth:`strftime` y :meth:`strptime`" #: ../Doc/library/datetime.rst:2296 msgid "" ":class:`date`, :class:`.datetime`, and :class:`.time` objects all support a " "``strftime(format)`` method, to create a string representing the time under " "the control of an explicit format string." msgstr "" ":class:`date`, :class:`.datetime`, y :class:`.time` los objetos admiten un " "método ``strftime(format)``, para crear una cadena que represente el tiempo " "bajo el control de una cadena de caracteres de formato explícito." #: ../Doc/library/datetime.rst:2300 msgid "" "Conversely, the :meth:`datetime.strptime` class method creates a :class:`." "datetime` object from a string representing a date and time and a " "corresponding format string." msgstr "" "Por el contrario, el método de clase :meth:`datetime.strptime` crea un " "objeto :class:`.datetime` a partir de una cadena que representa una fecha y " "hora y una cadena de formato correspondiente." #: ../Doc/library/datetime.rst:2304 msgid "" "The table below provides a high-level comparison of :meth:`strftime` versus :" "meth:`strptime`:" msgstr "" "La siguiente tabla proporciona una comparación de alto nivel de :meth:" "`strftime` versus :meth:`strptime`:" #: ../Doc/library/datetime.rst:2308 msgid "``strftime``" msgstr "``strftime``" #: ../Doc/library/datetime.rst:2308 msgid "``strptime``" msgstr "``strptime``" #: ../Doc/library/datetime.rst:2310 msgid "Usage" msgstr "Uso" #: ../Doc/library/datetime.rst:2310 msgid "Convert object to a string according to a given format" msgstr "" "Convierte objetos en una cadena de caracteres de acuerdo con un formato dado" #: ../Doc/library/datetime.rst:2310 msgid "" "Parse a string into a :class:`.datetime` object given a corresponding format" msgstr "" "*parsear* una cadena en un objeto :class:`.datetime` con el formato " "correspondiente" #: ../Doc/library/datetime.rst:2312 msgid "Type of method" msgstr "Tipo de método" #: ../Doc/library/datetime.rst:2312 msgid "Instance method" msgstr "Método de instancia" #: ../Doc/library/datetime.rst:2312 msgid "Class method" msgstr "Método de clase" #: ../Doc/library/datetime.rst:2314 msgid "Method of" msgstr "Método de" #: ../Doc/library/datetime.rst:2314 msgid ":class:`date`; :class:`.datetime`; :class:`.time`" msgstr ":class:`date`; :class:`.datetime`; :class:`.time`" #: ../Doc/library/datetime.rst:2314 msgid ":class:`.datetime`" msgstr ":class:`.datetime`" #: ../Doc/library/datetime.rst:2316 msgid "Signature" msgstr "Firma" #: ../Doc/library/datetime.rst:2316 msgid "``strftime(format)``" msgstr "``strftime(format)``" #: ../Doc/library/datetime.rst:2316 msgid "``strptime(date_string, format)``" msgstr "``strptime(date_string, format)``" #: ../Doc/library/datetime.rst:2321 msgid ":meth:`strftime` and :meth:`strptime` Format Codes" msgstr "Códigos de formato :meth:`strftime` y :meth:`strptime`" #: ../Doc/library/datetime.rst:2323 msgid "" "The following is a list of all the format codes that the 1989 C standard " "requires, and these work on all platforms with a standard C implementation." msgstr "" "La siguiente es una lista de todos los códigos de formato que requiere el " "estándar 1989 C, y estos funcionan en todas las plataformas con una " "implementación estándar C." #: ../Doc/library/datetime.rst:2327 ../Doc/library/datetime.rst:2430 msgid "Directive" msgstr "Directiva" #: ../Doc/library/datetime.rst:2327 ../Doc/library/datetime.rst:2430 msgid "Meaning" msgstr "Significado" #: ../Doc/library/datetime.rst:2327 ../Doc/library/datetime.rst:2430 msgid "Example" msgstr "Ejemplo" #: ../Doc/library/datetime.rst:2327 ../Doc/library/datetime.rst:2430 msgid "Notes" msgstr "Notas" #: ../Doc/library/datetime.rst:2329 msgid "``%a``" msgstr "``%a``" #: ../Doc/library/datetime.rst:2329 msgid "Weekday as locale's abbreviated name." msgstr "" "Día de la semana como nombre abreviado según la configuración regional." #: ../Doc/library/datetime.rst msgid "Sun, Mon, ..., Sat (en_US);" msgstr "*Sun, Mon, …, Sat (en_US)*;" #: ../Doc/library/datetime.rst msgid "So, Mo, ..., Sa (de_DE)" msgstr "*So, Mo, …, Sa (de_DE)*" #: ../Doc/library/datetime.rst:2334 msgid "``%A``" msgstr "``%A``" #: ../Doc/library/datetime.rst:2334 msgid "Weekday as locale's full name." msgstr "Día de la semana como nombre completo de la localidad." #: ../Doc/library/datetime.rst msgid "Sunday, Monday, ..., Saturday (en_US);" msgstr "*Sunday, Monday, …, Saturday (en_US)*;" #: ../Doc/library/datetime.rst msgid "Sonntag, Montag, ..., Samstag (de_DE)" msgstr "*Sonntag, Montag, …, Samstag (de_DE)*" #: ../Doc/library/datetime.rst:2339 msgid "``%w``" msgstr "``%w``" #: ../Doc/library/datetime.rst:2339 msgid "Weekday as a decimal number, where 0 is Sunday and 6 is Saturday." msgstr "" "Día de la semana como un número decimal, donde 0 es domingo y 6 es sábado." #: ../Doc/library/datetime.rst:2339 msgid "0, 1, ..., 6" msgstr "0, 1, …, 6" #: ../Doc/library/datetime.rst:2343 #, python-format msgid "``%d``" msgstr "``%d``" #: ../Doc/library/datetime.rst:2343 msgid "Day of the month as a zero-padded decimal number." msgstr "Día del mes como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2343 msgid "01, 02, ..., 31" msgstr "01, 02, …, 31" #: ../Doc/library/datetime.rst:2343 ../Doc/library/datetime.rst:2356 #: ../Doc/library/datetime.rst:2359 ../Doc/library/datetime.rst:2365 #: ../Doc/library/datetime.rst:2368 ../Doc/library/datetime.rst:2374 #: ../Doc/library/datetime.rst:2392 msgid "\\(9)" msgstr "\\(9)" #: ../Doc/library/datetime.rst:2346 msgid "``%b``" msgstr "``%b``" #: ../Doc/library/datetime.rst:2346 msgid "Month as locale's abbreviated name." msgstr "Mes como nombre abreviado según la configuración regional." #: ../Doc/library/datetime.rst msgid "Jan, Feb, ..., Dec (en_US);" msgstr "*Jan, Feb, …, Dec (en_US)*;" #: ../Doc/library/datetime.rst msgid "Jan, Feb, ..., Dez (de_DE)" msgstr "*Jan, Feb, …, Dez (de_DE)*" #: ../Doc/library/datetime.rst:2351 msgid "``%B``" msgstr "``%B``" #: ../Doc/library/datetime.rst:2351 msgid "Month as locale's full name." msgstr "Mes como nombre completo según la configuración regional." #: ../Doc/library/datetime.rst msgid "January, February, ..., December (en_US);" msgstr "*January, February, …, December (en_US)*;" #: ../Doc/library/datetime.rst msgid "Januar, Februar, ..., Dezember (de_DE)" msgstr "*Januar, Februar, …, Dezember (de_DE)*" #: ../Doc/library/datetime.rst:2356 msgid "``%m``" msgstr "``%m``" #: ../Doc/library/datetime.rst:2356 msgid "Month as a zero-padded decimal number." msgstr "Mes como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2356 ../Doc/library/datetime.rst:2368 msgid "01, 02, ..., 12" msgstr "01, 02, …, 12" #: ../Doc/library/datetime.rst:2359 msgid "``%y``" msgstr "``%y``" #: ../Doc/library/datetime.rst:2359 msgid "Year without century as a zero-padded decimal number." msgstr "Año sin siglo como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2359 msgid "00, 01, ..., 99" msgstr "00, 01, …, 99" #: ../Doc/library/datetime.rst:2362 msgid "``%Y``" msgstr "``%Y``" #: ../Doc/library/datetime.rst:2362 msgid "Year with century as a decimal number." msgstr "Año con siglo como número decimal." #: ../Doc/library/datetime.rst:2362 ../Doc/library/datetime.rst:2432 msgid "0001, 0002, ..., 2013, 2014, ..., 9998, 9999" msgstr "0001, 0002, …, 2013, 2014, …, 9998, 9999" #: ../Doc/library/datetime.rst:2365 msgid "``%H``" msgstr "``%H``" #: ../Doc/library/datetime.rst:2365 msgid "Hour (24-hour clock) as a zero-padded decimal number." msgstr "Hora (reloj de 24 horas) como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2365 msgid "00, 01, ..., 23" msgstr "00, 01, …, 23" #: ../Doc/library/datetime.rst:2368 msgid "``%I``" msgstr "``%I``" #: ../Doc/library/datetime.rst:2368 msgid "Hour (12-hour clock) as a zero-padded decimal number." msgstr "Hora (reloj de 12 horas) como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2371 msgid "``%p``" msgstr "``%p``" #: ../Doc/library/datetime.rst:2371 msgid "Locale's equivalent of either AM or PM." msgstr "El equivalente de la configuración regional de AM o PM." #: ../Doc/library/datetime.rst msgid "AM, PM (en_US);" msgstr "AM, PM (en_US);" #: ../Doc/library/datetime.rst msgid "am, pm (de_DE)" msgstr "am, pm (de_DE)" #: ../Doc/library/datetime.rst:2371 msgid "\\(1), \\(3)" msgstr "\\(1), \\(3)" #: ../Doc/library/datetime.rst:2374 msgid "``%M``" msgstr "``%M``" #: ../Doc/library/datetime.rst:2374 msgid "Minute as a zero-padded decimal number." msgstr "Minuto como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2374 ../Doc/library/datetime.rst:2377 msgid "00, 01, ..., 59" msgstr "00, 01, …, 59" #: ../Doc/library/datetime.rst:2377 msgid "``%S``" msgstr "``%S``" #: ../Doc/library/datetime.rst:2377 msgid "Second as a zero-padded decimal number." msgstr "Segundo como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2377 msgid "\\(4), \\(9)" msgstr "\\(4), \\(9)" #: ../Doc/library/datetime.rst:2380 #, python-format msgid "``%f``" msgstr "``%f``" #: ../Doc/library/datetime.rst:2380 #, fuzzy msgid "Microsecond as a decimal number, zero-padded to 6 digits." msgstr "" "Microsegundo como un número decimal, rellenado con ceros a la izquierda." #: ../Doc/library/datetime.rst:2380 msgid "000000, 000001, ..., 999999" msgstr "000000, 000001, …, 999999" #: ../Doc/library/datetime.rst:2380 msgid "\\(5)" msgstr "\\(5)" #: ../Doc/library/datetime.rst:2384 ../Doc/library/datetime.rst:2548 msgid "``%z``" msgstr "``%z``" #: ../Doc/library/datetime.rst:2384 msgid "" "UTC offset in the form ``±HHMM[SS[.ffffff]]`` (empty string if the object is " "naive)." msgstr "" "Desplazamiento (*offset*) UTC en la forma ``±HHMM[SS[.ffffff]]`` (cadena de " "caracteres vacía si el objeto es naíf (*naive*))." #: ../Doc/library/datetime.rst:2384 msgid "(empty), +0000, -0400, +1030, +063415, -030712.345216" msgstr "(vacío), +0000, -0400, +1030, +063415, -030712.345216" #: ../Doc/library/datetime.rst:2384 ../Doc/library/datetime.rst:2389 msgid "\\(6)" msgstr "\\(6)" #: ../Doc/library/datetime.rst:2389 ../Doc/library/datetime.rst:2572 msgid "``%Z``" msgstr "``%Z``" #: ../Doc/library/datetime.rst:2389 msgid "Time zone name (empty string if the object is naive)." msgstr "" "Nombre de zona horaria (cadena de caracteres vacía si el objeto es naíf " "(*naive*))." #: ../Doc/library/datetime.rst:2389 msgid "(empty), UTC, GMT" msgstr "(vacío), UTC, GMT" #: ../Doc/library/datetime.rst:2392 msgid "``%j``" msgstr "``%j``" #: ../Doc/library/datetime.rst:2392 msgid "Day of the year as a zero-padded decimal number." msgstr "Día del año como un número decimal rellenado con ceros." #: ../Doc/library/datetime.rst:2392 msgid "001, 002, ..., 366" msgstr "001, 002, …, 366" #: ../Doc/library/datetime.rst:2395 msgid "``%U``" msgstr "``%U``" #: ../Doc/library/datetime.rst:2395 #, fuzzy msgid "" "Week number of the year (Sunday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Sunday are " "considered to be in week 0." msgstr "" "Número de semana del año (domingo como primer día de la semana) como un " "número decimal rellenado con ceros. Todos los días en un nuevo año anterior " "al primer domingo se consideran en la semana 0." #: ../Doc/library/datetime.rst:2395 ../Doc/library/datetime.rst:2403 msgid "00, 01, ..., 53" msgstr "00, 01, …, 53" #: ../Doc/library/datetime.rst:2395 ../Doc/library/datetime.rst:2403 msgid "\\(7), \\(9)" msgstr "\\(7), \\(9)" #: ../Doc/library/datetime.rst:2403 msgid "``%W``" msgstr "``%W``" #: ../Doc/library/datetime.rst:2403 #, fuzzy msgid "" "Week number of the year (Monday as the first day of the week) as a zero-" "padded decimal number. All days in a new year preceding the first Monday are " "considered to be in week 0." msgstr "" "Número de semana del año (domingo como primer día de la semana) como un " "número decimal rellenado con ceros. Todos los días en un nuevo año anterior " "al primer domingo se consideran en la semana 0." #: ../Doc/library/datetime.rst:2411 #, python-format msgid "``%c``" msgstr "``%c``" #: ../Doc/library/datetime.rst:2411 msgid "Locale's appropriate date and time representation." msgstr "Representación apropiada de fecha y hora de la configuración regional." #: ../Doc/library/datetime.rst msgid "Tue Aug 16 21:30:00 1988 (en_US);" msgstr "*Tue Aug 16 21:30:00 1988 (en_US)*;" #: ../Doc/library/datetime.rst msgid "Di 16 Aug 21:30:00 1988 (de_DE)" msgstr "*Di 16 Aug 21:30:00 1988 (de_DE)*" #: ../Doc/library/datetime.rst:2416 #, python-format msgid "``%x``" msgstr "``%x``" #: ../Doc/library/datetime.rst:2416 msgid "Locale's appropriate date representation." msgstr "Representación de fecha apropiada de la configuración regional." #: ../Doc/library/datetime.rst msgid "08/16/88 (None);" msgstr "08/16/88 (*None*);" #: ../Doc/library/datetime.rst msgid "08/16/1988 (en_US);" msgstr "08/16/1988 (en_US);" #: ../Doc/library/datetime.rst msgid "16.08.1988 (de_DE)" msgstr "16.08.1988 (de_DE)" #: ../Doc/library/datetime.rst:2420 #, python-format msgid "``%X``" msgstr "``%X``" #: ../Doc/library/datetime.rst:2420 msgid "Locale's appropriate time representation." msgstr "Representación de la hora apropiada de la configuración regional." #: ../Doc/library/datetime.rst msgid "21:30:00 (en_US);" msgstr "21:30:00 (en_US);" #: ../Doc/library/datetime.rst msgid "21:30:00 (de_DE)" msgstr "21:30:00 (de_DE)" #: ../Doc/library/datetime.rst:2423 #, python-format msgid "``%%``" msgstr "``%%``" #: ../Doc/library/datetime.rst:2423 msgid "A literal ``'%'`` character." msgstr "Un carácter literal ``’%’``." #: ../Doc/library/datetime.rst:2423 msgid "%" msgstr "%" #: ../Doc/library/datetime.rst:2426 msgid "" "Several additional directives not required by the C89 standard are included " "for convenience. These parameters all correspond to ISO 8601 date values." msgstr "" "Se incluyen varias directivas adicionales no requeridas por el estándar C89 " "por conveniencia. Todos estos parámetros corresponden a valores de fecha ISO " "8601." #: ../Doc/library/datetime.rst:2432 #, python-format msgid "``%G``" msgstr "``%G``" #: ../Doc/library/datetime.rst:2432 msgid "" "ISO 8601 year with century representing the year that contains the greater " "part of the ISO week (``%V``)." msgstr "" "ISO 8601 año con siglo que representa el año que contiene la mayor parte de " "la semana ISO (``%V``)." #: ../Doc/library/datetime.rst:2432 msgid "\\(8)" msgstr "\\(8)" #: ../Doc/library/datetime.rst:2437 #, python-format msgid "``%u``" msgstr "``%u``" #: ../Doc/library/datetime.rst:2437 msgid "ISO 8601 weekday as a decimal number where 1 is Monday." msgstr "ISO 8601 día de la semana como un número decimal donde 1 es lunes." #: ../Doc/library/datetime.rst:2437 msgid "1, 2, ..., 7" msgstr "1, 2, …, 7" #: ../Doc/library/datetime.rst:2440 msgid "``%V``" msgstr "``%V``" #: ../Doc/library/datetime.rst:2440 msgid "" "ISO 8601 week as a decimal number with Monday as the first day of the week. " "Week 01 is the week containing Jan 4." msgstr "" "ISO 8601 semana como un número decimal con lunes como primer día de la " "semana. La semana 01 es la semana que contiene el 4 de enero." #: ../Doc/library/datetime.rst:2440 msgid "01, 02, ..., 53" msgstr "01, 02, …, 53" #: ../Doc/library/datetime.rst:2440 msgid "\\(8), \\(9)" msgstr "\\(8), \\(9)" #: ../Doc/library/datetime.rst:2447 msgid "" "These may not be available on all platforms when used with the :meth:" "`strftime` method. The ISO 8601 year and ISO 8601 week directives are not " "interchangeable with the year and week number directives above. Calling :" "meth:`strptime` with incomplete or ambiguous ISO 8601 directives will raise " "a :exc:`ValueError`." msgstr "" "Es posible que no estén disponibles en todas las plataformas cuando se usan " "con el método :meth:`strftime`. Las directivas ISO 8601 año e ISO 8601 " "semana no son intercambiables con las directivas de número de año y semana " "anteriores. Llamar a :meth:`strptime` con directivas ISO 8601 incompletas o " "ambiguas lanzará un :exc:`ValueError`." #: ../Doc/library/datetime.rst:2452 msgid "" "The full set of format codes supported varies across platforms, because " "Python calls the platform C library's :func:`strftime` function, and " "platform variations are common. To see the full set of format codes " "supported on your platform, consult the :manpage:`strftime(3)` " "documentation. There are also differences between platforms in handling of " "unsupported format specifiers." msgstr "" "El conjunto completo de códigos de formato admitidos varía según las " "plataformas, porque Python llama a la función :func:`strftime` de la " "biblioteca de la plataforma C, y las variaciones de la plataforma son " "comunes. Para ver el conjunto completo de códigos de formato admitidos en su " "plataforma, consulte la documentación :manpage:`strftime(3)`. También " "existen diferencias entre plataformas en el manejo de especificadores de " "formato no admitidos." #: ../Doc/library/datetime.rst:2458 #, python-format msgid "``%G``, ``%u`` and ``%V`` were added." msgstr "``%G``, ``%u`` y ``%V`` fueron añadidos." #: ../Doc/library/datetime.rst:2462 msgid "Technical Detail" msgstr "Detalle técnico" #: ../Doc/library/datetime.rst:2464 msgid "" "Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's " "``time.strftime(fmt, d.timetuple())`` although not all objects support a :" "meth:`timetuple` method." msgstr "" "En términos generales, ``d.strftime (fmt)`` actúa como el módulo :mod:`time` " "``time.strftime(fmt, d.timetuple())`` aunque no todos los objetos admiten el " "método :meth:`timetuple`." #: ../Doc/library/datetime.rst:2468 msgid "" "For the :meth:`datetime.strptime` class method, the default value is " "``1900-01-01T00:00:00.000``: any components not specified in the format " "string will be pulled from the default value. [#]_" msgstr "" "Para el método de clase :meth:`datetime.strptime`, el valor predeterminado " "es ``1900-01-01T00:00:00.000``: cualquier componente no especificado en la " "cadena de formato se extraerá del valor predeterminado. [#]_" #: ../Doc/library/datetime.rst:2472 msgid "Using ``datetime.strptime(date_string, format)`` is equivalent to::" msgstr "Usar ``datetime.strptime(date_string, format)`` es equivalente a::" #: ../Doc/library/datetime.rst:2476 msgid "" "except when the format includes sub-second components or timezone offset " "information, which are supported in ``datetime.strptime`` but are discarded " "by ``time.strptime``." msgstr "" "excepto cuando el formato incluye componentes de sub-segundos o información " "de compensación de zona horaria, que son compatibles con ``datetime." "strptime`` pero son descartados por ``time.strptime``." #: ../Doc/library/datetime.rst:2480 msgid "" "For :class:`.time` objects, the format codes for year, month, and day should " "not be used, as :class:`time` objects have no such values. If they're used " "anyway, ``1900`` is substituted for the year, and ``1`` for the month and " "day." msgstr "" "Para objetos de :class:`.time`, los códigos de formato para año, mes y día " "no deben usarse, ya que los objetos de :class:`.time` no tienen tales " "valores. Si se usan de todos modos, ``1900`` se sustituye por el año y ``1`` " "por el mes y el día." #: ../Doc/library/datetime.rst:2484 msgid "" "For :class:`date` objects, the format codes for hours, minutes, seconds, and " "microseconds should not be used, as :class:`date` objects have no such " "values. If they're used anyway, ``0`` is substituted for them." msgstr "" "Para los objetos :class:`date`, los códigos de formato para horas, minutos, " "segundos y microsegundos no deben usarse, ya que los objetos :class:`date` " "no tienen tales valores. Si se usan de todos modos, ``0`` se sustituye por " "ellos." #: ../Doc/library/datetime.rst:2488 msgid "" "For the same reason, handling of format strings containing Unicode code " "points that can't be represented in the charset of the current locale is " "also platform-dependent. On some platforms such code points are preserved " "intact in the output, while on others ``strftime`` may raise :exc:" "`UnicodeError` or return an empty string instead." msgstr "" "Por la misma razón, el manejo de cadenas de formato que contienen puntos de " "código Unicode que no se pueden representar en el conjunto de caracteres del " "entorno local actual también depende de la plataforma. En algunas " "plataformas, estos puntos de código se conservan intactos en la salida, " "mientras que en otros ``strftime`` puede generar :exc:`UnicodeError` o " "retornar una cadena vacía." #: ../Doc/library/datetime.rst:2497 msgid "" "Because the format depends on the current locale, care should be taken when " "making assumptions about the output value. Field orderings will vary (for " "example, \"month/day/year\" versus \"day/month/year\"), and the output may " "contain Unicode characters encoded using the locale's default encoding (for " "example, if the current locale is ``ja_JP``, the default encoding could be " "any one of ``eucJP``, ``SJIS``, or ``utf-8``; use :meth:`locale.getlocale` " "to determine the current locale's encoding)." msgstr "" "Debido a que el formato depende de la configuración regional actual, se debe " "tener cuidado al hacer suposiciones sobre el valor de salida. Los " "ordenamientos de campo variarán (por ejemplo, \"mes/día/año\" versus \"día/" "mes/año\"), y la salida puede contener caracteres Unicode codificados " "utilizando la codificación predeterminada de la configuración regional (por " "ejemplo, si la configuración regional actual es ``ja_JP``, la codificación " "predeterminada podría ser cualquiera de ``eucJP``, `` SJIS`` o ``utf-8``; " "use :meth:`locale.getlocale` para determinar la codificación de la " "configuración regional actual)." #: ../Doc/library/datetime.rst:2506 msgid "" "The :meth:`strptime` method can parse years in the full [1, 9999] range, but " "years < 1000 must be zero-filled to 4-digit width." msgstr "" "El método :meth:`strptime` puede analizar años en el rango completo [1, " "9999], pero los años < 1000 deben llenarse desde cero hasta un ancho de 4 " "dígitos." #: ../Doc/library/datetime.rst:2509 msgid "" "In previous versions, :meth:`strftime` method was restricted to years >= " "1900." msgstr "" "En versiones anteriores, el método :meth:`strftime` estaba restringido a " "años >= 1900." #: ../Doc/library/datetime.rst:2513 msgid "" "In version 3.2, :meth:`strftime` method was restricted to years >= 1000." msgstr "" "En la versión 3.2, el método :meth:`strftime` estaba restringido a años >= " "1000." #: ../Doc/library/datetime.rst:2518 msgid "" "When used with the :meth:`strptime` method, the ``%p`` directive only " "affects the output hour field if the ``%I`` directive is used to parse the " "hour." msgstr "" "Cuando se usa con el método :meth:`strptime`, la directiva ``%p`` solo " "afecta el campo de hora de salida si se usa la directiva ``%I`` para " "analizar la hora." #: ../Doc/library/datetime.rst:2522 msgid "" "Unlike the :mod:`time` module, the :mod:`datetime` module does not support " "leap seconds." msgstr "" "A diferencia del módulo :mod:`time`, el módulo :mod:`datetime` no admite " "segundos intercalares." #: ../Doc/library/datetime.rst:2526 #, python-format msgid "" "When used with the :meth:`strptime` method, the ``%f`` directive accepts " "from one to six digits and zero pads on the right. ``%f`` is an extension to " "the set of format characters in the C standard (but implemented separately " "in datetime objects, and therefore always available)." msgstr "" "Cuando se usa con el método :meth:`strptime`, la `%f`` directiva acepta de " "uno a seis dígitos y cero *pads* a la derecha. ``%f`` es una extensión del " "conjunto de caracteres de formato en el estándar *C* (pero implementado por " "separado en objetos de fecha y hora y, por lo tanto, siempre disponible)." #: ../Doc/library/datetime.rst:2533 msgid "" "For a naive object, the ``%z`` and ``%Z`` format codes are replaced by empty " "strings." msgstr "" "Para un objeto naíf (*naive*), los códigos de formato ``%z`` y ``%Z`` se " "reemplazan por cadenas vacías." #: ../Doc/library/datetime.rst:2536 msgid "For an aware object:" msgstr "Para un objeto consciente (*aware*)" #: ../Doc/library/datetime.rst:2539 msgid "" ":meth:`utcoffset` is transformed into a string of the form ``±HHMM[SS[." "ffffff]]``, where ``HH`` is a 2-digit string giving the number of UTC offset " "hours, ``MM`` is a 2-digit string giving the number of UTC offset minutes, " "``SS`` is a 2-digit string giving the number of UTC offset seconds and " "``ffffff`` is a 6-digit string giving the number of UTC offset microseconds. " "The ``ffffff`` part is omitted when the offset is a whole number of seconds " "and both the ``ffffff`` and the ``SS`` part is omitted when the offset is a " "whole number of minutes. For example, if :meth:`utcoffset` returns " "``timedelta(hours=-3, minutes=-30)``, ``%z`` is replaced with the string " "``'-0330'``." msgstr "" ":meth:`utcoffset` se transforma en una cadena de la forma ``±HHMM[SS[." "ffffff]]``, donde``HH`` es una cadena de 2 dígitos que da el número de horas " "de desplazamiento UTC,``MM`` es una cadena de 2 dígitos que da el número de " "minutos de desplazamiento UTC,``SS`` es una cadena de 2 dígitos que da el " "número de segundos de desplazamiento UTC y ``ffffff`` es una cadena de 6 " "dígitos que da el número de microsegundos de desplazamiento UTC. La parte " "``ffffff`` se omite cuando el desplazamiento es un número entero de segundos " "y tanto la parte ``ffffff`` como la parte ``SS`` se omiten cuando el " "desplazamiento es un número entero de minutos. Por ejemplo, si :meth:" "`utcoffset` retorna ``timedelta(hours=-3, minutes=-30)``, ``%z`` se " "reemplaza con la cadena ``'-0330'``." #: ../Doc/library/datetime.rst:2553 msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, the " "UTC offsets can have a colon as a separator between hours, minutes and " "seconds. For example, ``'+01:00:00'`` will be parsed as an offset of one " "hour. In addition, providing ``'Z'`` is identical to ``'+00:00'``." msgstr "" "Cuando la directiva ``%z`` se proporciona al método :meth:`strptime`, las " "compensaciones UTC pueden tener dos puntos como separador entre horas, " "minutos y segundos. Por ejemplo, ``’+01:00:00’`` se analizará como una " "compensación de una hora. Además, proporcionar ``'Z'`` es idéntico a " "``’+00:00’``." #: ../Doc/library/datetime.rst:2561 msgid "" "In :meth:`strftime`, ``%Z`` is replaced by an empty string if :meth:`tzname` " "returns ``None``; otherwise ``%Z`` is replaced by the returned value, which " "must be a string." msgstr "" "En :meth:`strftime`, ``%Z`` se reemplaza por una cadena de caracteres vacía " "si :meth:`tzname` retorna ``None``; de lo contrario, ``%Z`` se reemplaza por " "el valor retornado, que debe ser una cadena de caracteres." #: ../Doc/library/datetime.rst:2565 msgid ":meth:`strptime` only accepts certain values for ``%Z``:" msgstr ":meth:`strptime` solo acepta ciertos valores para ``%Z``:" #: ../Doc/library/datetime.rst:2567 msgid "any value in ``time.tzname`` for your machine's locale" msgstr "" "cualquier valor en ``time.tzname`` para la configuración regional de su " "máquina" #: ../Doc/library/datetime.rst:2568 msgid "the hard-coded values ``UTC`` and ``GMT``" msgstr "los valores codificados de forma rígida ``UTC`` y ``GMT``" #: ../Doc/library/datetime.rst:2570 msgid "" "So someone living in Japan may have ``JST``, ``UTC``, and ``GMT`` as valid " "values, but probably not ``EST``. It will raise ``ValueError`` for invalid " "values." msgstr "" "Entonces, alguien que viva en Japón puede tener ``JST``, ``UTC`` y ``GMT`` " "como valores válidos, pero probablemente no ``EST``. Lanzará ``ValueError`` " "para valores no válidos." #: ../Doc/library/datetime.rst:2574 msgid "" "When the ``%z`` directive is provided to the :meth:`strptime` method, an " "aware :class:`.datetime` object will be produced. The ``tzinfo`` of the " "result will be set to a :class:`timezone` instance." msgstr "" "Cuando la directiva ``%z`` se proporciona al método :meth:`strptime`, se " "lanzará un objeto consciente :class:`.datetime`. El ``tzinfo`` del resultado " "se establecerá en una instancia :class:`timezone`." #: ../Doc/library/datetime.rst:2580 msgid "" "When used with the :meth:`strptime` method, ``%U`` and ``%W`` are only used " "in calculations when the day of the week and the calendar year (``%Y``) are " "specified." msgstr "" "Cuando se usa con el método :meth:`strptime`, ``%U`` y ``%W`` solo se usan " "en los cálculos cuando se especifican el día de la semana y el año " "calendario (``%Y``) ." #: ../Doc/library/datetime.rst:2585 #, python-format msgid "" "Similar to ``%U`` and ``%W``, ``%V`` is only used in calculations when the " "day of the week and the ISO year (``%G``) are specified in a :meth:" "`strptime` format string. Also note that ``%G`` and ``%Y`` are not " "interchangeable." msgstr "" "Similar a ``%U`` y ``%W``, ``%V`` solo se usa en cálculos cuando el día de " "la semana y el año ISO (``%G``) se especifican en :meth:`strptime` cadena de " "formato. También tenga en cuenta que ``%G`` y ``%Y`` no son intercambiables." #: ../Doc/library/datetime.rst:2591 #, python-format msgid "" "When used with the :meth:`strptime` method, the leading zero is optional " "for formats ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%J``, ``%U``, " "``%W``, and ``%V``. Format ``%y`` does require a leading zero." msgstr "" "Cuando se usa con el método :meth:`strptime`, el cero inicial es opcional " "para los formatos ``%d``, ``%m``, ``%H``, ``%I``, ``%M``, ``%S``, ``%J``, " "``%U``, ``%W`` y ``%V``. El formato ``%y`` requiere un cero a la izquierda." #: ../Doc/library/datetime.rst:2596 msgid "Footnotes" msgstr "Pie de notas" #: ../Doc/library/datetime.rst:2597 msgid "If, that is, we ignore the effects of Relativity" msgstr "Es decir, si ignoramos los efectos de la relatividad" #: ../Doc/library/datetime.rst:2599 msgid "" "This matches the definition of the \"proleptic Gregorian\" calendar in " "Dershowitz and Reingold's book *Calendrical Calculations*, where it's the " "base calendar for all computations. See the book for algorithms for " "converting between proleptic Gregorian ordinals and many other calendar " "systems." msgstr "" "Esto coincide con la definición del calendario \"proléptico gregoriano\" en " "el libro de *Dershowitz y Reingold* *Cálculos calendáricos*, donde es el " "calendario base para todos los cálculos. Consulte el libro sobre algoritmos " "para convertir entre ordinales gregorianos prolépticos y muchos otros " "sistemas de calendario." #: ../Doc/library/datetime.rst:2605 #, fuzzy msgid "" "See R. H. van Gent's `guide to the mathematics of the ISO 8601 calendar " "`_ for a good explanation." msgstr "" "Consulte la guía de *R. H. van Gent’s* `guide to the mathematics of the ISO " "8601 calendar `_ para una buena explicación." #: ../Doc/library/datetime.rst:2609 #, python-format msgid "" "Passing ``datetime.strptime('Feb 29', '%b %d')`` will fail since ``1900`` is " "not a leap year." msgstr "" "Si se pasa ``datetime.strptime (’29 de febrero’, ‘%b %d’)`` fallará ya que " "``1900`` no es un año bisiesto." #~ msgid "" #~ "This is the inverse of :meth:`date.isoformat`. It only supports the " #~ "format ``YYYY-MM-DD``." #~ msgstr "" #~ "Este es el inverso de :meth:`date.isoformat`. Solo admite el formato " #~ "``AAAA-MM-DD``." #~ msgid "This is the inverse of :meth:`date.fromisoformat`." #~ msgstr "Este es el inverso de :meth:`date.fromisoformat`." #~ msgid "" #~ "Return a :class:`.datetime` corresponding to a *date_string* in one of " #~ "the formats emitted by :meth:`date.isoformat` and :meth:`datetime." #~ "isoformat`." #~ msgstr "" #~ "Retorna :class:`.datetime` correspondiente a *date_string* en uno de los " #~ "formatos emitidos por :meth:`date.isoformat` y :meth:`datetime.isoformat`." #~ msgid "Specifically, this function supports strings in the format:" #~ msgstr "" #~ "Específicamente, esta función admite cadenas de caracteres en el formato:" #~ msgid "" #~ "This does *not* support parsing arbitrary ISO 8601 strings - it is only " #~ "intended as the inverse operation of :meth:`datetime.isoformat`. A more " #~ "full-featured ISO 8601 parser, ``dateutil.parser.isoparse`` is available " #~ "in the third-party package `dateutil `__." #~ msgstr "" #~ "Esto *no* admite el *parsing* de cadenas de caracteres arbitrarias ISO " #~ "8601; solo está pensado cómo la operación inversa de :meth:`datetime." #~ "isoformat`. Un *parseador* ISO 8601 mas completo, ``dateutil.parser." #~ "isoparse`` está disponible en el paquete de terceros `dateutil `__." #~ msgid "" #~ "Return a :class:`.time` corresponding to a *time_string* in one of the " #~ "formats emitted by :meth:`time.isoformat`. Specifically, this function " #~ "supports strings in the format:" #~ msgstr "" #~ "Retorna una :class:`.time` correspondiente a *time_string* en uno de los " #~ "formatos emitidos por :meth:`time.isoformat`. Específicamente, esta " #~ "función admite cadenas de caracteres en el formato:" #~ msgid "" #~ "This does *not* support parsing arbitrary ISO 8601 strings. It is only " #~ "intended as the inverse operation of :meth:`time.isoformat`." #~ msgstr "" #~ "Esto *no* admite el *parsing* de cadenas arbitrarias ISO 8601. Solo " #~ "pretende ser la operación inversa de :meth:`time.isoformat`." #~ msgid "`dateutil.tz `_" #~ msgstr "`dateutil.tz `_" #~ msgid "" #~ "Week number of the year (Monday as the first day of the week) as a " #~ "decimal number. All days in a new year preceding the first Monday are " #~ "considered to be in week 0." #~ msgstr "" #~ "Número de semana del año (lunes como primer día de la semana) como número " #~ "decimal. Todos los días en un nuevo año anterior al primer lunes se " #~ "consideran en la semana 0."