-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdatetime.po
More file actions
3242 lines (2584 loc) · 230 KB
/
Copy pathdatetime.po
File metadata and controls
3242 lines (2584 loc) · 230 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Alireza Shabani (Revisto) <[email protected]>, 2025
# Danial Behzadi <[email protected]>, 2025
# Parham Forati, 2025
# Rafael Fontenelle <[email protected]>, 2025
# Sepehr Rasouli <[email protected]>, 2026
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-09-16 12:56+0000\n"
"PO-Revision-Date: 2026-09-13 14:43+0330\n"
"Last-Translator: Sepehr Rasouli <[email protected]>, 2026\n"
"Language-Team: Persian (https://github.com/python/python-docs-fa/fa/)\n"
"Language: fa\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 3.6\n"
msgid ":mod:`!datetime` --- Basic date and time types"
msgstr ":mod:`!datetime` --- انواع پایه تاریخ و زمان"
msgid "**Source code:** :source:`Lib/datetime.py`"
msgstr "**کد منبع:** :source:`Lib/datetime.py`"
msgid "The :mod:`!datetime` module supplies classes for manipulating dates and times."
msgstr "ماژول :mod:`!datetime` کلاسهایی برای دستکاری تاریخها و زمانها فراهم میکند."
msgid "While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation."
msgstr "اگرچه از محاسبات تاریخ و زمان پشتیبانی میشود، تمرکز پیادهسازی بر استخراج کارآمد ویژگیها برای قالببندی و دستکاری خروجی است."
msgid "Skip to :ref:`the format codes <format-codes>`."
msgstr "پرش به :ref:`کدهای قالب <format-codes>`."
msgid "Module :mod:`calendar`"
msgstr "ماژول :mod:`calendar`"
msgid "General calendar related functions."
msgstr "توابع عمومی مرتبط با گاهشماری."
msgid "Module :mod:`time`"
msgstr "ماژول :mod:`time`"
msgid "Time access and conversions."
msgstr "دسترسی به زمان و تبدیلها."
msgid "Module :mod:`zoneinfo`"
msgstr "ماژول :mod:`zoneinfo`"
msgid "Concrete time zones representing the IANA time zone database."
msgstr "مناطق زمانی عینی که نشاندهندهی پایگاه دادهی مناطق زمانی IANA هستند."
msgid "Package `dateutil <https://dateutil.readthedocs.io/en/stable/>`_"
msgstr "بسته `dateutil <https://dateutil.readthedocs.io/en/stable/>`_"
msgid "Third-party library with expanded time zone and parsing support."
msgstr "کتابخانه شخص ثالث با پشتیبانی گستردهتر از منطقههای زمانی و تجزیه."
msgid "Package :pypi:`DateType`"
msgstr "بسته :pypi:`DateType`"
msgid "Third-party library that introduces distinct static types to for example, allow :term:`static type checkers <static type checker>` to differentiate between naive and aware datetimes."
msgstr "کتابخانه شخص ثالثی که انواع ایستای متمایزی را معرفی میکند تا برای مثال، به :term:`بررسیکنندههای نوع ایستا <static type checker>` اجازه دهد بین datetimeهای naive و aware تمایز قائل شوند."
msgid "Aware and naive objects"
msgstr "اشیای آگاه و ساده"
msgid "Date and time objects may be categorized as \"aware\" or \"naive\" depending on whether or not they include time zone information."
msgstr "اشیاء تاریخ و زمان ممکن است بسته به اینکه شامل اطلاعات منطقهی زمانی باشند یا نه، بهعنوان «آگاه» یا «ساده» (naive) دستهبندی شوند."
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 "با دانش کافی دربارهی تنظیمهای زمانی الگوریتمی و سیاسی قابلاعمال، مانند اطلاعات منطقهی زمانی و ساعت تابستانی، یک شیء **آگاه** میتواند موقعیت خود را نسبت به سایر اشیاء آگاه تعیین کند. یک شیء آگاه، یک لحظهی مشخص از زمان را نشان میدهد که جای تفسیر ندارد. [#]_"
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 time zone 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 "یک شیء **ساده** حاوی اطلاعات کافی برای تعیین موقعیت خود بهصورت غیرمبهم نسبت به سایر اشیای تاریخ/زمان نیست. اینکه یک شیء ساده نشاندهندهی زمان هماهنگ جهانی (UTC)، زمان محلی یا زمان در یک منطقهی زمانی دیگر باشد، کاملاً به برنامه بستگی دارد؛ درست همانطور که اینکه یک عدد خاص نشاندهندهی متر، مایل یا جرم باشد، به برنامه بستگی دارد. درک و کار کردن با اشیای ساده آسان است، به بهای چشمپوشی از برخی جنبههای واقعیت."
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 "برای برنامههایی که به اشیای آگاه نیاز دارند، اشیای :class:`.datetime` و :class:`.time` دارای یک ویژگی اختیاری اطلاعات منطقهی زمانی، :attr:`!tzinfo`، هستند که میتواند به نمونهای از زیرکلاسی از کلاس انتزاعی :class:`!tzinfo` تنظیم شود. این اشیای :class:`tzinfo` اطلاعات مربوط به اختلاف نسبت به زمان UTC، نام منطقهی زمانی و فعال بودن ساعت تابستانی را ذخیره میکنند."
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 time zones with fixed offsets from UTC, such as UTC itself or North American EST and EDT time zones. Supporting time zones 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 "تنها یک کلاس عینی :class:`tzinfo`، یعنی کلاس :class:`timezone`، توسط ماژول :mod:`!datetime` ارائه شده است. کلاس :class:`!timezone` میتواند مناطق زمانی ساده با فاصلههای ثابت از UTC را نشان دهد، مانند خود UTC یا مناطق زمانی EST و EDT آمریکای شمالی. پشتیبانی از مناطق زمانی با سطوح عمیقتری از جزئیات بر عهدهی برنامه است. قوانین تنظیم زمان در سراسر جهان بیشتر سیاسی هستند تا منطقی، بهطور مکرر تغییر میکنند، و هیچ استاندارد مناسبی برای همهی برنامهها بهجز UTC وجود ندارد."
msgid "Constants"
msgstr "ثابتها"
msgid "The :mod:`!datetime` module exports the following constants:"
msgstr "ماژول :mod:`!datetime` ثابتهای زیر را اکسپورت میکند:"
msgid "The smallest year number allowed in a :class:`date` or :class:`.datetime` object. :const:`MINYEAR` is 1."
msgstr "کوچکترین شماره سال مجاز در یک شیء :class:`date` یا :class:`.datetime`. :const:`MINYEAR` برابر ۱ است."
msgid "The largest year number allowed in a :class:`date` or :class:`.datetime` object. :const:`MAXYEAR` is 9999."
msgstr "بزرگترین شماره سال مجاز در یک شیء :class:`date` یا :class:`.datetime`. :const:`MAXYEAR` برابر ۹۹۹۹ است."
msgid "Alias for the UTC time zone singleton :attr:`datetime.timezone.utc`."
msgstr "نام مستعاری برای تکنمونهی منطقهی زمانی UTC :attr:`datetime.timezone.utc`."
msgid "Available types"
msgstr "انواع موجود"
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 "یک تاریخ سادهی ایدهآلسازیشده، با فرض اینکه گاهشماری میلادی جاری همیشه برقرار بوده و همیشه برقرار خواهد بود. ویژگیها: :attr:`year`، :attr:`month` و :attr:`day`."
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 "یک زمان ایدهآلسازیشده، مستقل از هر روز معین، با این فرض که هر روز دقیقاً ۲۴\\*۶۰\\*۶۰ ثانیه دارد. (در اینجا هیچ مفهومی از «ثانیههای کبیسه» وجود ندارد.) ویژگیها: :attr:`hour`، :attr:`minute`، :attr:`second`، :attr:`microsecond` و :attr:`.tzinfo`."
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 "ترکیبی از یک تاریخ و یک زمان. ویژگیها: :attr:`year`، :attr:`month`، :attr:`day`، :attr:`hour`، :attr:`minute`، :attr:`second`، :attr:`microsecond` و :attr:`.tzinfo`."
msgid "A duration expressing the difference between two :class:`.datetime` or :class:`date` instances to microsecond resolution."
msgstr "مدتزمانی که تفاوت بین دو نمونه از :class:`.datetime` یا :class:`date` را تا دقت میکروثانیه بیان میکند."
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 "یک کلاس پایه انتزاعی برای اشیای اطلاعات منطقه زمانی. این اشیاء توسط کلاسهای :class:`.datetime` و :class:`.time` استفاده میشوند تا مفهومی قابل سفارشیسازی از تنظیم زمان فراهم شود (برای مثال، برای در نظر گرفتن منطقه زمانی و/یا ساعت تابستانی)."
msgid "A class that implements the :class:`tzinfo` abstract base class as a fixed offset from the UTC."
msgstr "کلاسی که کلاس پایه انتزاعی :class:`tzinfo` را بهصورت یک آفست ثابت از UTC پیادهسازی میکند."
msgid "Objects of these types are immutable."
msgstr "اشیای این نوعها تغییرناپذیر هستند."
msgid "Subclass relationships:"
msgstr "روابط زیرکلاسها:"
msgid ""
"timedelta, tzinfo, time, and date inherit from object; timezone inherits\n"
"from tzinfo; and datetime inherits from date."
msgstr "timedelta، tzinfo، time و date از object ارث میبرند؛ timezone از tzinfo ارث میبرد؛ و datetime از date ارث میبرد."
msgid "Common properties"
msgstr "ویژگیهای مشترک"
msgid "The :class:`date`, :class:`.datetime`, :class:`.time`, and :class:`timezone` types share these common features:"
msgstr "انواع :class:`date`، :class:`.datetime`، :class:`.time` و :class:`timezone` این ویژگیهای مشترک را دارند:"
msgid "Objects of these types are :term:`hashable`, meaning that they can be used as dictionary keys."
msgstr "اشیای این نوعها :term:`هشپذیر <hashable>` هستند، یعنی میتوان از آنها بهعنوان کلیدهای دیکشنری استفاده کرد."
msgid "Objects of these types support efficient pickling via the :mod:`pickle` module."
msgstr "اشیاء این نوعها از پیکلکردن کارآمد از طریق ماژول :mod:`pickle` پشتیبانی میکنند."
msgid "Determining if an object is aware or naive"
msgstr "تعیین آگاه یا ساده بودن یک شیء"
msgid "Objects of the :class:`date` type are always naive."
msgstr "اشیای نوع :class:`date` همیشه ساده هستند."
msgid "An object of type :class:`.time` or :class:`.datetime` may be aware or naive."
msgstr "یک شیء از نوع :class:`.time` یا :class:`.datetime` ممکن است آگاه یا ساده باشد."
msgid "A :class:`.datetime` object ``d`` is aware if both of the following hold:"
msgstr "یک شیء :class:`.datetime` به نام ``d`` آگاه است اگر هر دو شرط زیر برقرار باشند:"
msgid "``d.tzinfo`` is not ``None``"
msgstr "``d.tzinfo`` برابر با ``None`` نیست"
msgid "``d.tzinfo.utcoffset(d)`` does not return ``None``"
msgstr "``d.tzinfo.utcoffset(d)`` مقدار ``None`` را برنمیگرداند"
msgid "Otherwise, ``d`` is naive."
msgstr "در غیر این صورت، ``d`` ساده است."
msgid "A :class:`.time` object ``t`` is aware if both of the following hold:"
msgstr "یک شیء ``t`` از کلاس :class:`.time` آگاه است اگر هر دو مورد زیر برقرار باشند:"
msgid "``t.tzinfo`` is not ``None``"
msgstr "``t.tzinfo`` برابر ``None`` نیست"
msgid "``t.tzinfo.utcoffset(None)`` does not return ``None``."
msgstr "``t.tzinfo.utcoffset(None)`` مقدار ``None`` را برنمیگرداند."
msgid "Otherwise, ``t`` is naive."
msgstr "در غیر این صورت، ``t`` ساده است."
msgid "The distinction between aware and naive doesn't apply to :class:`timedelta` objects."
msgstr "تمایز میان آگاه و ساده برای اشیای :class:`timedelta` صدق نمیکند."
msgid ":class:`!timedelta` objects"
msgstr "اشیاء :class:`!timedelta`"
msgid "A :class:`timedelta` object represents a duration, the difference between two :class:`.datetime` or :class:`date` instances."
msgstr "یک شیء :class:`timedelta` نشاندهندهی یک بازهی زمانی، یعنی اختلاف بین دو نمونه از :class:`.datetime` یا :class:`date` است."
msgid "All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative."
msgstr "تمام آرگومانها اختیاری هستند و مقدار پیشفرض آنها ۰ است. آرگومانها میتوانند عدد صحیح یا عدد اعشاری باشند و میتوانند مثبت یا منفی باشند."
msgid "Only *days*, *seconds* and *microseconds* are stored internally. Arguments are converted to those units:"
msgstr "فقط *days*، *seconds* و *microseconds* بهصورت داخلی ذخیره میشوند. آرگومانها به آن واحدها تبدیل میشوند:"
msgid "A millisecond is converted to 1000 microseconds."
msgstr "یک میلیثانیه به ۱۰۰۰ میکروثانیه تبدیل میشود."
msgid "A minute is converted to 60 seconds."
msgstr "یک دقیقه به ۶۰ ثانیه تبدیل میشود."
msgid "An hour is converted to 3600 seconds."
msgstr "یک ساعت به ۳۶۰۰ ثانیه تبدیل میشود."
msgid "A week is converted to 7 days."
msgstr "یک هفته به ۷ روز تبدیل میشود."
msgid "and days, seconds and microseconds are then normalized so that the representation is unique, with"
msgstr "و روزها، ثانیهها و میکروثانیهها سپس نرمال میشوند تا نمایش یکتا باشد، با"
msgid "``0 <= microseconds < 1000000``"
msgstr "``0 <= microseconds < 1000000``"
msgid "``0 <= seconds < 3600*24`` (the number of seconds in one day)"
msgstr "``0 <= seconds < 3600*24`` (تعداد ثانیهها در یک روز)"
msgid "``-999999999 <= days <= 999999999``"
msgstr "``-999999999 <= days <= 999999999``"
msgid "The following example illustrates how any arguments besides *days*, *seconds* and *microseconds* are \"merged\" and normalized into those three resulting attributes::"
msgstr "مثال زیر نشان میدهد که چگونه هر آرگومانی بهجز *days*، *seconds* و *microseconds* «ادغام» و در آن سه ویژگی حاصل نرمالسازی میشود::"
msgid ""
">>> import datetime as dt\n"
">>> delta = dt.timedelta(\n"
"... days=50,\n"
"... seconds=27,\n"
"... microseconds=10,\n"
"... milliseconds=29000,\n"
"... minutes=5,\n"
"... hours=8,\n"
"... weeks=2\n"
"... )\n"
">>> # Only days, seconds, and microseconds remain\n"
">>> delta\n"
"datetime.timedelta(days=64, seconds=29156, microseconds=10)"
msgstr ""
">>> import datetime as dt\n"
">>> delta = dt.timedelta(\n"
"... days=50,\n"
"... seconds=27,\n"
"... microseconds=10,\n"
"... milliseconds=29000,\n"
"... minutes=5,\n"
"... hours=8,\n"
"... weeks=2\n"
"... )\n"
">>> # Only days, seconds, and microseconds remain\n"
">>> delta\n"
"datetime.timedelta(days=64, seconds=29156, microseconds=10)"
msgid "``import datetime as dt`` instead of ``import datetime`` or ``from datetime import datetime`` to avoid confusion between the module and the class. See `How I Import Python’s datetime Module <https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/>`__."
msgstr "``import datetime as dt`` بهجای ``import datetime`` یا ``from datetime import datetime``، برای جلوگیری از اشتباه گرفتن ماژول با کلاس. به `چگونه ماژول datetime پایتون را ایمپورت میکنم <https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/>`__ مراجعه کنید."
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 "اگر دستکم یکی از آرگومانها عدد اعشاری باشد و بخشهای کسری میکروثانیه وجود داشته باشد، بخشهای کسری میکروثانیه باقیمانده از همه آرگومانها با هم ترکیب میشوند و مجموع آنها با استفاده از قاعدهی رفع تساوی گرد کردن نیمه به زوج (round-half-to-even) به نزدیکترین میکروثانیه گرد میشود. اگر هیچ آرگومانی عدد اعشاری نباشد، فرآیندهای تبدیل و عادیسازی دقیق هستند (هیچ اطلاعاتی از دست نمیرود)."
msgid "If the normalized value of days lies outside the indicated range, :exc:`OverflowError` is raised."
msgstr "اگر مقدار نرمالشدهی days خارج از محدودهی مشخصشده باشد، :exc:`OverflowError` پرتاب میشود."
msgid "Note that normalization of negative values may be surprising at first. For example::"
msgstr "توجه داشته باشید که نرمالسازی مقادیر منفی ممکن است در ابتدا شگفتآور باشد. برای مثال::"
msgid ""
">>> import datetime as dt\n"
">>> d = dt.timedelta(microseconds=-1)\n"
">>> (d.days, d.seconds, d.microseconds)\n"
"(-1, 86399, 999999)"
msgstr ""
">>> import datetime as dt\n"
">>> d = dt.timedelta(microseconds=-1)\n"
">>> (d.days, d.seconds, d.microseconds)\n"
"(-1, 86399, 999999)"
msgid "Since the string representation of :class:`!timedelta` objects can be confusing, use the following recipe to produce a more readable format:"
msgstr "از آنجا که نمایش رشتهای اشیاء :class:`!timedelta` میتواند گیجکننده باشد، برای تولید قالبی خواناتر از راهکار زیر استفاده کنید:"
msgid ""
">>> def pretty_timedelta(td):\n"
"... if td.days >= 0:\n"
"... return str(td)\n"
"... return f'-({-td!s})'\n"
"...\n"
">>> d = timedelta(hours=-1)\n"
">>> str(d) # not human-friendly\n"
"'-1 day, 23:00:00'\n"
">>> pretty_timedelta(d)\n"
"'-(1:00:00)'"
msgstr ""
">>> def pretty_timedelta(td):\n"
"... if td.days >= 0:\n"
"... return str(td)\n"
"... return f'-({-td!s})'\n"
"...\n"
">>> d = timedelta(hours=-1)\n"
">>> str(d) # not human-friendly\n"
"'-1 day, 23:00:00'\n"
">>> pretty_timedelta(d)\n"
"'-(1:00:00)'"
msgid "Class attributes:"
msgstr "ویژگیهای کلاس:"
msgid "The most negative :class:`timedelta` object, ``timedelta(-999999999)``."
msgstr "منفیترین شیء :class:`timedelta`، ``timedelta(-999999999)``."
msgid "The most positive :class:`timedelta` object, ``timedelta(days=999999999, hours=23, minutes=59, seconds=59, microseconds=999999)``."
msgstr "مثبتترین شیء :class:`timedelta`، ``timedelta(days=999999999, hours=23, minutes=59, seconds=59, microseconds=999999)``."
msgid "The smallest possible difference between non-equal :class:`timedelta` objects, ``timedelta(microseconds=1)``."
msgstr "کوچکترین اختلاف ممکن بین شیءهای غیرمساوی :class:`timedelta`، ``timedelta(microseconds=1)``."
msgid "Note that, because of normalization, ``timedelta.max`` is greater than ``-timedelta.min``. ``-timedelta.max`` is not representable as a :class:`timedelta` object."
msgstr "توجه داشته باشید که به دلیل نرمالسازی، ``timedelta.max`` بزرگتر از ``-timedelta.min`` است. ``-timedelta.max`` بهصورت یک شیء :class:`timedelta` قابل بازنمایی نیست."
msgid "Instance attributes (read-only):"
msgstr "ویژگیهای نمونه (فقطخواندنی):"
msgid "Between -999,999,999 and 999,999,999 inclusive."
msgstr "بین -۹۹۹٬۹۹۹٬۹۹۹ و ۹۹۹٬۹۹۹٬۹۹۹، شامل هر دو مقدار."
msgid "Between 0 and 86,399 inclusive."
msgstr "بین ۰ تا ۸۶٬۳۹۹ (شامل هر دو)."
msgid "It is a somewhat common bug for code to unintentionally use this attribute when it is actually intended to get a :meth:`~timedelta.total_seconds` value instead:"
msgstr "این اشکالی نسبتاً رایج است که کد بهطور غیرعمدی از این ویژگی استفاده کند، در حالی که در واقع قصد بر این بوده است که بهجای آن مقدار :meth:`~timedelta.total_seconds` دریافت شود:"
msgid ""
">>> import datetime as dt\n"
">>> duration = dt.timedelta(seconds=11235813)\n"
">>> duration.days, duration.seconds\n"
"(130, 3813)\n"
">>> duration.total_seconds()\n"
"11235813.0"
msgstr ""
">>> import datetime as dt\n"
">>> duration = dt.timedelta(seconds=11235813)\n"
">>> duration.days, duration.seconds\n"
"(130, 3813)\n"
">>> duration.total_seconds()\n"
"11235813.0"
msgid "Between 0 and 999,999 inclusive."
msgstr "از ۰ تا ۹۹۹٬۹۹۹ (شامل هر دو)."
msgid "Supported operations:"
msgstr "عملیات پشتیبانیشده:"
msgid "Operation"
msgstr "عملیات"
msgid "Result"
msgstr "نتیجه"
msgid "``t1 = t2 + t3``"
msgstr "``t1 = t2 + t3``"
msgid "Sum of ``t2`` and ``t3``. Afterwards ``t1 - t2 == t3`` and ``t1 - t3 == t2`` are true. (1)"
msgstr "مجموع ``t2`` و ``t3``. پس از آن، ``t1 - t2 == t3`` و ``t1 - t3 == t2`` درست هستند. (1)"
msgid "``t1 = t2 - t3``"
msgstr "``t1 = t2 - t3``"
msgid "Difference of ``t2`` and ``t3``. Afterwards ``t1 == t2 - t3`` and ``t2 == t1 + t3`` are true. (1)(6)"
msgstr "تفاضل ``t2`` و ``t3``. پس از آن ``t1 == t2 - t3`` و ``t2 == t1 + t3`` برقرار هستند. (1)(6)"
msgid "``t1 = t2 * i or t1 = i * t2``"
msgstr "``t1 = t2 * i or t1 = i * t2``"
msgid "Delta multiplied by an integer. Afterwards ``t1 // i == t2`` is true, provided ``i != 0``."
msgstr "دلتا ضربشده در یک عدد صحیح. پس از آن ``t1 // i == t2`` برقرار است، به شرطی که ``i != 0``."
msgid "In general, ``t1 * i == t1 * (i-1) + t1`` is true. (1)"
msgstr "بهطور کلی، ``t1 * i == t1 * (i-1) + t1`` برقرار است. (1)"
msgid "``t1 = t2 * f or t1 = f * t2``"
msgstr "``t1 = t2 * f or t1 = f * t2``"
msgid "Delta multiplied by a float. The result is rounded to the nearest multiple of timedelta.resolution using round-half-to-even."
msgstr "دلتا در یک float ضرب میشود. نتیجه به نزدیکترین مضرب timedelta.resolution با استفاده از روش گرد کردن نیمه به زوج (round-half-to-even) گرد میشود."
msgid "``f = t2 / t3``"
msgstr "``f = t2 / t3``"
msgid "Division (3) of overall duration ``t2`` by interval unit ``t3``. Returns a :class:`float` object."
msgstr "تقسیم (۳) مدتزمان کل ``t2`` بر واحد بازه ``t3``. یک شیء :class:`float` برمیگرداند."
msgid "``t1 = t2 / f or t1 = t2 / i``"
msgstr "``t1 = t2 / f or t1 = t2 / i``"
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 "دلتا تقسیمشده بر یک float یا int. نتیجه به نزدیکترین مضرب timedelta.resolution با استفاده از گرد کردن نیمه به زوج (round-half-to-even) گرد میشود."
msgid "``t1 = t2 // i`` or ``t1 = t2 // t3``"
msgstr "``t1 = t2 // i`` یا ``t1 = t2 // t3``"
msgid "The floor is computed and the remainder (if any) is thrown away. In the second case, an integer is returned. (3)"
msgstr "مقدار کف محاسبه میشود و باقیمانده (در صورت وجود) دور انداخته میشود. در حالت دوم، یک عدد صحیح برگردانده میشود. (۳)"
msgid "``t1 = t2 % t3``"
msgstr "``t1 = t2 % t3``"
msgid "The remainder is computed as a :class:`timedelta` object. (3)"
msgstr "باقیمانده بهصورت یک شیء :class:`timedelta` محاسبه میشود. (3)"
msgid "``q, r = divmod(t1, t2)``"
msgstr "``q, r = divmod(t1, t2)``"
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 "خارجقسمت و باقیمانده را محاسبه میکند: ``q = t1 // t2`` (3) و ``r = t1 % t2``. ``q`` یک عدد صحیح است و ``r`` یک شیء :class:`timedelta` است."
msgid "``+t1``"
msgstr "``+t1``"
msgid "Returns a :class:`timedelta` object with the same value. (2)"
msgstr "یک شیء :class:`timedelta` با همان مقدار برمیگرداند. (2)"
msgid "``-t1``"
msgstr "``-t1``"
msgid "Equivalent to ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)``, and to ``t1 * -1``. (1)(4)"
msgstr "معادل ``timedelta(-t1.days, -t1.seconds, -t1.microseconds)`` و ``t1 * -1`` است. (1)(4)"
msgid "``abs(t)``"
msgstr "``abs(t)``"
msgid "Equivalent to ``+t`` when ``t.days >= 0``, and to ``-t`` when ``t.days < 0``. (2)"
msgstr "هنگامی که ``t.days >= 0`` باشد، معادل ``+t`` و هنگامی که ``t.days < 0`` باشد، معادل ``-t`` است. (2)"
msgid "``str(t)``"
msgstr "``str(t)``"
msgid "Returns a string in the form ``[D day[s], ][H]H:MM:SS[.UUUUUU]``, where D is negative for negative ``t``. (5)"
msgstr "رشتهای را در قالب ``[D day[s], ][H]H:MM:SS[.UUUUUU]`` برمیگرداند، که در آن D در صورت منفی بودن ``t`` منفی است. (5)"
msgid "``repr(t)``"
msgstr "``repr(t)``"
msgid "Returns a string representation of the :class:`timedelta` object as a constructor call with canonical attribute values."
msgstr "نمایش رشتهای شیء :class:`timedelta` را بهصورت یک فراخوانی سازنده با مقادیر ویژگیهای کانونیکال برمیگرداند."
msgid "Notes:"
msgstr "یادداشتها:"
msgid "This is exact but may overflow."
msgstr "این دقیق است، اما ممکن است سرریز شود."
msgid "This is exact and cannot overflow."
msgstr "این دقیق است و نمیتواند سرریز کند."
msgid "Division by zero raises :exc:`ZeroDivisionError`."
msgstr "تقسیم بر صفر باعث پرتاب :exc:`ZeroDivisionError` میشود."
msgid "``-timedelta.max`` is not representable as a :class:`timedelta` object."
msgstr "``-timedelta.max`` بهصورت یک شیء :class:`timedelta` قابل نمایش نیست."
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 "نمایشهای رشتهای اشیای :class:`timedelta` بهصورت مشابهی با نمایش داخلی آنها نرمال میشوند. این موضوع برای timedeltaهای منفی به نتایج نسبتاً غیرمعمولی منجر میشود. برای مثال::"
msgid ""
">>> timedelta(hours=-5)\n"
"datetime.timedelta(days=-1, seconds=68400)\n"
">>> print(_)\n"
"-1 day, 19:00:00"
msgstr ""
">>> timedelta(hours=-5)\n"
"datetime.timedelta(days=-1, seconds=68400)\n"
">>> print(_)\n"
"-1 day, 19:00:00"
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 "عبارت ``t2 - t3`` همیشه با عبارت ``t2 + (-t3)`` برابر خواهد بود، مگر وقتی t3 برابر ``timedelta.max`` باشد؛ در آن حالت، عبارت اول نتیجهای تولید میکند، در حالی که عبارت دوم سرریز میشود."
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 "علاوه بر عملیات فهرستشده در بالا، اشیای :class:`timedelta` از برخی عملیات جمع و تفریق با اشیای :class:`date` و :class:`.datetime` پشتیبانی میکنند (در ادامه ببینید)."
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 "تقسیم کف و تقسیم حقیقی یک شیء :class:`timedelta` بر یک شیء :class:`!timedelta` دیگر اکنون پشتیبانی میشوند؛ همچنین عملیات باقیمانده و تابع :func:`divmod` نیز پشتیبانی میشوند. تقسیم حقیقی و ضرب یک شیء :class:`!timedelta` در یک شیء :class:`float` اکنون پشتیبانی میشوند."
msgid ":class:`timedelta` objects support equality and order comparisons."
msgstr "اشیای :class:`timedelta` از مقایسههای برابری و ترتیب پشتیبانی میکنند."
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 "در زمینههای بولی، یک شیء :class:`timedelta` تنها و تنها در صورتی درست در نظر گرفته میشود که با ``timedelta(0)`` برابر نباشد."
msgid "Instance methods:"
msgstr "متدهای نمونه:"
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 (for example, ``td / timedelta(microseconds=1)``)."
msgstr "تعداد کل ثانیههای موجود در مدت را برمیگرداند. معادل ``td / timedelta(seconds=1)`` است. برای واحدهای بازهای غیر از ثانیه، از شکل تقسیم بهطور مستقیم استفاده کنید (برای مثال، ``td / timedelta(microseconds=1)``)."
msgid "Note that for very large time intervals (greater than 270 years on most platforms) this method will lose microsecond accuracy."
msgstr "توجه داشته باشید که برای بازههای زمانی بسیار بزرگ (بیش از ۲۷۰ سال در بیشتر پلتفرمها)، این متد دقت میکروثانیهای را از دست خواهد داد."
msgid "Examples of usage: :class:`!timedelta`"
msgstr "نمونههای کاربرد: :class:`!timedelta`"
msgid "An additional example of normalization::"
msgstr "مثالی اضافی از نرمالسازی::"
msgid ""
">>> # Components of another_year add up to exactly 365 days\n"
">>> import datetime as dt\n"
">>> year = dt.timedelta(days=365)\n"
">>> another_year = dt.timedelta(weeks=40, days=84, hours=23,\n"
"... minutes=50, seconds=600)\n"
">>> year == another_year\n"
"True\n"
">>> year.total_seconds()\n"
"31536000.0"
msgstr ""
">>> # Components of another_year add up to exactly 365 days\n"
">>> import datetime as dt\n"
">>> year = dt.timedelta(days=365)\n"
">>> another_year = dt.timedelta(weeks=40, days=84, hours=23,\n"
"... minutes=50, seconds=600)\n"
">>> year == another_year\n"
"True\n"
">>> year.total_seconds()\n"
"31536000.0"
msgid "Examples of :class:`timedelta` arithmetic::"
msgstr "نمونههایی از محاسبات :class:`timedelta`::"
msgid ""
">>> import datetime as dt\n"
">>> year = dt.timedelta(days=365)\n"
">>> ten_years = 10 * year\n"
">>> ten_years\n"
"datetime.timedelta(days=3650)\n"
">>> ten_years.days // 365\n"
"10\n"
">>> nine_years = ten_years - year\n"
">>> nine_years\n"
"datetime.timedelta(days=3285)\n"
">>> three_years = nine_years // 3\n"
">>> three_years, three_years.days // 365\n"
"(datetime.timedelta(days=1095), 3)"
msgstr ""
">>> import datetime as dt\n"
">>> year = dt.timedelta(days=365)\n"
">>> ten_years = 10 * year\n"
">>> ten_years\n"
"datetime.timedelta(days=3650)\n"
">>> ten_years.days // 365\n"
"10\n"
">>> nine_years = ten_years - year\n"
">>> nine_years\n"
"datetime.timedelta(days=3285)\n"
">>> three_years = nine_years // 3\n"
">>> three_years, three_years.days // 365\n"
"(datetime.timedelta(days=1095), 3)"
msgid ":class:`!date` objects"
msgstr "اشیای :class:`!date`"
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 "یک شیء :class:`date` نشاندهنده یک تاریخ (سال، ماه و روز) در یک گاهشماری ایدهآل است، یعنی گاهشماری میلادی کنونی که بهطور نامحدود در هر دو جهت امتداد یافته است."
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 "۱ ژانویه سال ۱، روز شمارهی ۱ نامیده میشود، ۲ ژانویه سال ۱، روز شمارهی ۲ نامیده میشود و به همین ترتیب. [#]_"
msgid "All arguments are required. Arguments must be integers, in the following ranges:"
msgstr "همهی آرگومانها الزامی هستند. آرگومانها باید عدد صحیح باشند و در بازههای زیر قرار داشته باشند:"
msgid "``MINYEAR <= year <= MAXYEAR``"
msgstr "``MINYEAR <= year <= MAXYEAR``"
msgid "``1 <= month <= 12``"
msgstr "``1 <= month <= 12``"
msgid "``1 <= day <= number of days in the given month and year``"
msgstr "``1 <= day <= number of days in the given month and year``"
msgid "If an argument outside those ranges is given, :exc:`ValueError` is raised."
msgstr "اگر آرگومانی خارج از آن بازهها داده شود، :exc:`ValueError` پرتاب میشود."
msgid "Other constructors, all class methods:"
msgstr "سازندههای دیگر، همه متدهای کلاس:"
msgid "Return the current local date."
msgstr "تاریخ محلی فعلی را برمیگرداند."
msgid "This is equivalent to ``date.fromtimestamp(time.time())``."
msgstr "این معادل ``date.fromtimestamp(time.time())`` است."
msgid "Return the local date corresponding to the POSIX *timestamp*, such as is returned by :func:`time.time`."
msgstr "تاریخ محلی متناظر با *برچسب زمانی* POSIX را برمیگرداند، مانند مقداری که توسط :func:`time.time` برگردانده میشود."
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 "این ممکن است در صورتی که برچسب زمانی خارج از بازه مقادیر پشتیبانیشده توسط تابع C :c:func:`localtime` در سکو باشد، :exc:`OverflowError` را پرتاب کند، و در صورت شکست :c:func:`localtime` نیز :exc:`OSError` را پرتاب کند. این معمولاً به سالهای ۱۹۷۰ تا ۲۰۳۸ محدود است. توجه داشته باشید که در سیستمهای غیر POSIX که ثانیههای کبیسه را در مفهوم برچسب زمانی خود لحاظ میکنند، ثانیههای کبیسه توسط :meth:`fromtimestamp` نادیده گرفته میشوند."
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 "اگر برچسب زمانی خارج از محدوده مقادیر پشتیبانیشده توسط تابع :c:func:`localtime` در C پلتفرم باشد، :exc:`OverflowError` به جای :exc:`ValueError` پرتاب میشود. در صورت شکست :c:func:`localtime`، :exc:`OSError` به جای :exc:`ValueError` پرتاب میشود."
msgid "Return the date corresponding to the proleptic Gregorian *ordinal*, where January 1 of year 1 has ordinal 1."
msgstr "تاریخ متناظر با *ordinal* در گاهشماری میلادی تعمیمیافته (proleptic Gregorian) را برمیگرداند؛ بهطوریکه ۱ ژانویه سال ۱ دارای شماره ترتیبی ۱ است."
msgid ":exc:`ValueError` is raised unless ``1 <= ordinal <= date.max.toordinal()``. For any date ``d``, ``date.fromordinal(d.toordinal()) == d``."
msgstr "استثنای :exc:`ValueError` پرتاب میشود مگر اینکه ``1 <= ordinal <= date.max.toordinal()``. برای هر تاریخ ``d``، ``date.fromordinal(d.toordinal()) == d``."
msgid "Return a :class:`date` corresponding to a *date_string* given in any valid ISO 8601 format, with the following exceptions:"
msgstr "یک :class:`date` متناظر با *date_string* دادهشده در هر قالب معتبر ISO 8601 برمیگرداند، با استثناهای زیر:"
msgid "Reduced precision dates are not currently supported (``YYYY-MM``, ``YYYY``)."
msgstr "تاریخهای با دقت کاهشیافته در حال حاضر پشتیبانی نمیشوند (``YYYY-MM``، ``YYYY``)."
msgid "Extended date representations are not currently supported (``±YYYYYY-MM-DD``)."
msgstr "بازنماییهای گستردهی تاریخ در حال حاضر پشتیبانی نمیشوند (``±YYYYYY-MM-DD``)."
msgid "Ordinal dates are not currently supported (``YYYY-OOO``)."
msgstr "تاریخهای ترتیبی در حال حاضر پشتیبانی نمیشوند (``YYYY-OOO``)."
msgid "Examples::"
msgstr "مثالها::"
msgid ""
">>> import datetime as dt\n"
">>> dt.date.fromisoformat('2019-12-04')\n"
"datetime.date(2019, 12, 4)\n"
">>> dt.date.fromisoformat('20191204')\n"
"datetime.date(2019, 12, 4)\n"
">>> dt.date.fromisoformat('2021-W01-1')\n"
"datetime.date(2021, 1, 4)"
msgstr ""
">>> import datetime as dt\n"
">>> dt.date.fromisoformat('2019-12-04')\n"
"datetime.date(2019, 12, 4)\n"
">>> dt.date.fromisoformat('20191204')\n"
"datetime.date(2019, 12, 4)\n"
">>> dt.date.fromisoformat('2021-W01-1')\n"
"datetime.date(2021, 1, 4)"
msgid "Previously, this method only supported the format ``YYYY-MM-DD``."
msgstr "پیشتر، این متد فقط از قالب ``YYYY-MM-DD`` پشتیبانی میکرد."
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 "یک :class:`date` متناظر با تاریخ گاهشماری ISO مشخصشده با *year*، *week* و *day* برمیگرداند. این معکوس تابع :meth:`date.isocalendar` است."
msgid "Return a :class:`.date` corresponding to *date_string*, parsed according to *format*. This is equivalent to::"
msgstr "یک :class:`.date` متناظر با *date_string* را برمیگرداند، که بر اساس *format* تجزیهشده است. این معادل است با::"
msgid "date(*(time.strptime(date_string, format)[0:3]))"
msgstr "date(*(time.strptime(date_string, format)[0:3]))"
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. See also :ref:`strftime-strptime-behavior` and :meth:`date.fromisoformat`."
msgstr ":exc:`ValueError` در صورتی پرتاب میشود که date_string و format توسط :func:`time.strptime` قابل تجزیه نباشند یا این تابع مقداری برگرداند که یک تاپل زمانیی (time tuple) نیست. همچنین ببینید :ref:`strftime-strptime-behavior` و :meth:`date.fromisoformat`."
msgid "If *format* specifies a day of month without a year a :exc:`DeprecationWarning` is emitted. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. Such *format* values may raise an error as of Python 3.15. The workaround is to always include a year in your *format*. If parsing *date_string* values that do not have a year, explicitly add a year that is a leap year before parsing:"
msgstr "اگر *format* روزی از ماه را بدون سال تعیین کند، یک :exc:`DeprecationWarning` نشان داده میشود. این کار برای اجتناب از یک اشکال چهارسالهی مربوط به سال کبیسه در کدی است که فقط به دنبال تجزیهی ماه و روز است، زیرا سال پیشفرضی که در نبود سال در قالب استفاده میشود، سال کبیسه نیست. چنین مقادیر *format* ممکن است از پایتون 3.15 به بعد خطایی پرتاب کنند. راهحل این است که همیشه یک سال را در *format* خود بگنجانید. اگر مقادیر *date_string* را که سال ندارند تجزیه میکنید، پیش از تجزیه بهصراحت یک سال کبیسه اضافه کنید:"
msgid ""
">>> import datetime as dt\n"
">>> date_string = \"02/29\"\n"
">>> when = dt.date.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # Avoids leap year bug.\n"
">>> when.strftime(\"%B %d\")\n"
"'February 29'"
msgstr ""
">>> import datetime as dt\n"
">>> date_string = \"02/29\"\n"
">>> when = dt.date.strptime(f\"{date_string};1984\", \"%m/%d;%Y\") # Avoids leap year bug.\n"
">>> when.strftime(\"%B %d\")\n"
"'February 29'"
msgid "The earliest representable date, ``date(MINYEAR, 1, 1)``."
msgstr "زودترین تاریخ قابل نمایش، ``date(MINYEAR, 1, 1)``."
msgid "The latest representable date, ``date(MAXYEAR, 12, 31)``."
msgstr "آخرین تاریخ قابلنمایش، ``date(MAXYEAR, 12, 31)``."
msgid "The smallest possible difference between non-equal date objects, ``timedelta(days=1)``."
msgstr "کمترین اختلاف ممکن بین اشیای date نابرابر، ``timedelta(days=1)``."
msgid "Between :const:`MINYEAR` and :const:`MAXYEAR` inclusive."
msgstr "بین :const:`MINYEAR` و :const:`MAXYEAR` (شامل هر دو مقدار)."
msgid "Between 1 and 12 inclusive."
msgstr "بین ۱ تا ۱۲، شامل هر دو."
msgid "Between 1 and the number of days in the given month of the given year."
msgstr "بین ۱ تا تعداد روزهای ماه دادهشده در سال دادهشده."
msgid "``date2 = date1 + timedelta``"
msgstr "``date2 = date1 + timedelta``"
msgid "``date2`` will be ``timedelta.days`` days after ``date1``. (1)"
msgstr "``date2`` به اندازهی ``timedelta.days`` روز پس از ``date1`` خواهد بود. (1)"
msgid "``date2 = date1 - timedelta``"
msgstr "``date2 = date1 - timedelta``"
msgid "Computes ``date2`` such that ``date2 + timedelta == date1``. (2)"
msgstr "``date2`` را بهگونهای محاسبه میکند که ``date2 + timedelta == date1``. (2)"
msgid "``timedelta = date1 - date2``"
msgstr "``timedelta = date1 - date2``"
msgid "\\(3)"
msgstr "\\(3)"
msgid "``date1 == date2``"
msgstr "``date1 == date2``"
msgid "``date1 != date2``"
msgstr "``date1 != date2``"
msgid "Equality comparison. (4)"
msgstr "مقایسه برابری. (۴)"
msgid "``date1 < date2``"
msgstr "``date1 < date2``"
msgid "``date1 > date2``"
msgstr "``date1 > date2``"
msgid "``date1 <= date2``"
msgstr "``date1 <= date2``"
msgid "``date1 >= date2``"
msgstr "``date1 >= date2``"
msgid "Order comparison. (5)"
msgstr "مقایسهی ترتیب. (۵)"
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* اگر ``timedelta.days > 0`` باشد، به جلو در زمان منتقل میشود، یا اگر ``timedelta.days < 0`` باشد، به عقب در زمان منتقل میشود. پس از آن ``date2 - date1 == timedelta.days`` خواهد بود. ``timedelta.seconds`` و ``timedelta.microseconds`` نادیده گرفته میشوند. اگر ``date2.year`` کوچکتر از :const:`MINYEAR` یا بزرگتر از :const:`MAXYEAR` باشد، :exc:`OverflowError` پرتاب میشود."
msgid "``timedelta.seconds`` and ``timedelta.microseconds`` are ignored."
msgstr "``timedelta.seconds`` و ``timedelta.microseconds`` نادیده گرفته میشوند."
msgid "This is exact, and cannot overflow. ``timedelta.seconds`` and ``timedelta.microseconds`` are 0, and ``date2 + timedelta == date1`` after."
msgstr "این دقیق است و امکان سرریز ندارد. ``timedelta.seconds`` و ``timedelta.microseconds`` برابر ۰ هستند و پس از آن ``date2 + timedelta == date1`` برقرار است."
msgid ":class:`date` objects are equal if they represent the same date."
msgstr "اشیای :class:`date` زمانی با هم برابرند که تاریخ یکسانی را نشان دهند."
msgid ":class:`!date` objects that are not also :class:`.datetime` instances are never equal to :class:`!datetime` objects, even if they represent the same date."
msgstr "اشیای :class:`!date` که نمونههای :class:`.datetime` نیز نیستند، هرگز با اشیای :class:`!datetime` برابر نیستند، حتی اگر نشاندهندهی تاریخ یکسانی باشند."
msgid "*date1* is considered less than *date2* when *date1* precedes *date2* in time. In other words, ``date1 < date2`` if and only if ``date1.toordinal() < date2.toordinal()``."
msgstr "*date1* کمتر از *date2* در نظر گرفته میشود هرگاه *date1* از نظر زمانی پیش از *date2* باشد. به عبارت دیگر، ``date1 < date2`` اگر و فقط اگر ``date1.toordinal() < date2.toordinal()``."
msgid "Order comparison between a :class:`date` object that is not also a :class:`.datetime` instance and a :class:`!datetime` object raises :exc:`TypeError`."
msgstr "مقایسه ترتیبی بین یک شیء :class:`date` که نمونهای از :class:`.datetime` نیز نیست و یک شیء :class:`!datetime` باعث پرتاب :exc:`TypeError` میشود."
msgid "Comparison between :class:`.datetime` object and an instance of the :class:`date` subclass that is not a :class:`!datetime` subclass no longer converts the latter to :class:`!date`, ignoring the time part and the time zone. The default behavior can be changed by overriding the special comparison methods in subclasses."
msgstr "مقایسه بین شیء :class:`.datetime` و نمونهای از زیرکلاس :class:`date` که زیرکلاسی از :class:`!datetime` نیست، دیگر دومی را با نادیده گرفتن بخش زمان و منطقهی زمانی به :class:`!date` تبدیل نمیکند. میتوان رفتار پیشفرض را با بازنویسی متدهای ویژهی مقایسه در زیرکلاسها تغییر داد."
msgid "In Boolean contexts, all :class:`date` objects are considered to be true."
msgstr "در زمینههای بولی، تمام اشیاء :class:`date` بهعنوان درست در نظر گرفته میشوند."
msgid "Return a new :class:`date` object with the same values, but with specified parameters updated."
msgstr "یک شیء :class:`date` جدید با همان مقادیر برمیگرداند، اما پارامترهای مشخصشده بهروزرسانی میشوند."
msgid "Example::"
msgstr "مثال::"
msgid ""
">>> import datetime as dt\n"
">>> d = dt.date(2002, 12, 31)\n"
">>> d.replace(day=26)\n"
"datetime.date(2002, 12, 26)"
msgstr ""
">>> import datetime as dt\n"
">>> d = dt.date(2002, 12, 31)\n"
">>> d.replace(day=26)\n"
"datetime.date(2002, 12, 26)"
msgid "The generic function :func:`copy.replace` also supports :class:`date` objects."
msgstr "تابع عام :func:`copy.replace` همچنین از اشیای :class:`date` پشتیبانی میکند."
msgid "Return a :class:`time.struct_time` such as returned by :func:`time.localtime`."
msgstr "یک :class:`time.struct_time` برمیگرداند، مانند آنچه :func:`time.localtime` برمیگرداند."
msgid "The hours, minutes and seconds are 0, and the DST flag is -1."
msgstr "ساعتها، دقیقهها و ثانیهها ۰ هستند و پرچم DST برابر منفی ۱ است."
msgid "``d.timetuple()`` is equivalent to::"
msgstr "``d.timetuple()`` معادل است با::"
msgid "time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))"
msgstr "time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1))"
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 "که در آن ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` شمارهی روز در سال جاری است و از ۱ برای ۱ ژانویه آغاز میشود."
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 "شمارهی ترتیبی تاریخ در گاهشماری میلادی تعمیمیافته را برمیگرداند، که در آن ۱ ژانویه سال ۱ دارای شمارهی ترتیبی ۱ است. برای هر شیء :class:`date` مانند ``d``، ``date.fromordinal(d.toordinal()) == d`` است."
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 "روز هفته را بهصورت یک عدد صحیح برمیگرداند، که در آن دوشنبه ۰ و یکشنبه ۶ است. برای مثال، ``date(2002, 12, 4).weekday() == 2``، یک چهارشنبه. همچنین :meth:`isoweekday` را ببینید."
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 "روز هفته را بهصورت یک عدد صحیح برمیگرداند، بهگونهای که دوشنبه ۱ و یکشنبه ۷ است. برای مثال، ``date(2002, 12, 4).isoweekday() == 3``، یک چهارشنبه. همچنین ببینید :meth:`weekday`، :meth:`isocalendar`."
msgid "Return a :term:`named tuple` object with three components: ``year``, ``week`` and ``weekday``."
msgstr "یک شیء :term:`named tuple` با سه کامپوننت برمیگرداند: ``year``، ``week`` و ``weekday``."
msgid "The ISO calendar is a widely used variant of the Gregorian calendar. [#]_"
msgstr "گاهشماری ISO گونهای پرکاربرد از گاهشماری میلادی است. [#]_"
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 "سال ISO شامل ۵۲ یا ۵۳ هفتهی کامل است و هر هفته از دوشنبه شروع میشود و در یکشنبه پایان مییابد. اولین هفتهی سال ISO، اولین هفتهی گاهشماریی (میلادی) از سال است که شامل یک پنجشنبه باشد. این هفته، هفته شماره ۱ نامیده میشود و سال ISO آن پنجشنبه برابر با سال میلادی آن است."
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 "برای مثال، سال ۲۰۰۴ در پنجشنبه آغاز میشود، بنابراین نخستین هفتهی سال ISO ۲۰۰۴ در دوشنبه، ۲۹ دسامبر ۲۰۰۳ آغاز میشود و در یکشنبه، ۴ ژانویهی ۲۰۰۴ پایان مییابد::"
msgid ""
">>> import datetime as dt\n"
">>> dt.date(2003, 12, 29).isocalendar()\n"
"datetime.IsoCalendarDate(year=2004, week=1, weekday=1)\n"
">>> dt.date(2004, 1, 4).isocalendar()\n"
"datetime.IsoCalendarDate(year=2004, week=1, weekday=7)"
msgstr ""
">>> import datetime as dt\n"
">>> dt.date(2003, 12, 29).isocalendar()\n"
"datetime.IsoCalendarDate(year=2004, week=1, weekday=1)\n"
">>> dt.date(2004, 1, 4).isocalendar()\n"
"datetime.IsoCalendarDate(year=2004, week=1, weekday=7)"
msgid "Result changed from a tuple to a :term:`named tuple`."
msgstr "نتیجه از یک تاپل به یک :term:`تاپل نامدار <named tuple>` تغییر کرد."
msgid "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::"
msgstr "رشتهای را برمیگرداند که نشاندهندهی تاریخ در قالب ISO 8601 است، ``YYYY-MM-DD``::"
msgid ""
">>> import datetime as dt\n"
">>> dt.date(2002, 12, 4).isoformat()\n"
"'2002-12-04'"
msgstr ""
">>> import datetime as dt\n"
">>> dt.date(2002, 12, 4).isoformat()\n"
"'2002-12-04'"
msgid "For a date ``d``, ``str(d)`` is equivalent to ``d.isoformat()``."
msgstr "برای یک تاریخ ``d``، ``str(d)`` معادل ``d.isoformat()`` است."
msgid "Return a string representing the date::"
msgstr "رشتهای را برمیگرداند که نشاندهندهی تاریخ است::"
msgid ""
">>> import datetime as dt\n"
">>> dt.date(2002, 12, 4).ctime()\n"
"'Wed Dec 4 00:00:00 2002'"
msgstr ""
">>> import datetime as dt\n"
">>> dt.date(2002, 12, 4).ctime()\n"
"'Wed Dec 4 00:00:00 2002'"
msgid "``d.ctime()`` is equivalent to::"
msgstr "``d.ctime()`` معادل است با::"
msgid "time.ctime(time.mktime(d.timetuple()))"
msgstr "time.ctime(time.mktime(d.timetuple()))"
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 "در سکوهایی که تابع بومی C :c:func:`ctime` (که :func:`time.ctime` آن را فراخوانی میکند، اما :meth:`date.ctime` آن را فراخوانی نمیکند) با استاندارد C مطابقت دارد."
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. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`."
msgstr "رشتهای برمیگرداند که نشاندهندهی تاریخ است و با یک رشته قالب صریح کنترل میشود. کدهای قالب مربوط به ساعت، دقیقه یا ثانیه مقدار ۰ خواهند داشت. همچنین ببینید :ref:`strftime-strptime-behavior` و :meth:`date.isoformat`."
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 <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`."
msgstr "همانند :meth:`.date.strftime`. این امر به شما امکان میدهد که یک رشتهی قالب را برای یک شیء :class:`.date` در :ref:`رشتههای قالببندیشده <f-strings>` و هنگام استفاده از :meth:`str.format` تعیین کنید. همچنین :ref:`strftime-strptime-behavior` و :meth:`date.isoformat` را ببینید."
msgid "Examples of usage: :class:`!date`"
msgstr "نمونههایی از کاربرد: :class:`!date`"
msgid "Example of counting days to an event::"
msgstr "مثالی از شمارش روزها تا یک رویداد::"
msgid ""
">>> import time\n"
">>> import datetime as dt\n"
">>> today = dt.date.today()\n"
">>> today\n"
"datetime.date(2007, 12, 5)\n"
">>> today == dt.date.fromtimestamp(time.time())\n"
"True\n"
">>> my_birthday = dt.date(today.year, 6, 24)\n"
">>> if my_birthday < today:\n"
"... my_birthday = my_birthday.replace(year=today.year + 1)\n"
"...\n"
">>> my_birthday\n"
"datetime.date(2008, 6, 24)\n"
">>> time_to_birthday = abs(my_birthday - today)\n"
">>> time_to_birthday.days\n"
"202"
msgstr ""
">>> import time\n"
">>> import datetime as dt\n"
">>> today = dt.date.today()\n"
">>> today\n"
"datetime.date(2007, 12, 5)\n"
">>> today == dt.date.fromtimestamp(time.time())\n"
"True\n"
">>> my_birthday = dt.date(today.year, 6, 24)\n"
">>> if my_birthday < today:\n"
"... my_birthday = my_birthday.replace(year=today.year + 1)\n"
"...\n"
">>> my_birthday\n"
"datetime.date(2008, 6, 24)\n"
">>> time_to_birthday = abs(my_birthday - today)\n"
">>> time_to_birthday.days\n"
"202"
msgid "More examples of working with :class:`date`:"
msgstr "مثالهای بیشتر از کار با :class:`date`:"
msgid ""
">>> import datetime as dt\n"
">>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001\n"
">>> d\n"
"datetime.date(2002, 3, 11)\n"
"\n"
">>> # Methods related to formatting string output\n"
">>> d.isoformat()\n"
"'2002-03-11'\n"
">>> d.strftime(\"%d/%m/%y\")\n"
"'11/03/02'\n"
">>> d.strftime(\"%A %d. %B %Y\")\n"
"'Monday 11. March 2002'\n"
">>> d.ctime()\n"
"'Mon Mar 11 00:00:00 2002'\n"
">>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, \"day\", \"month\")\n"
"'The day is 11, the month is March.'\n"
"\n"
">>> # Methods for extracting 'components' under different calendars\n"
">>> t = d.timetuple()\n"
">>> for i in t:\n"
"... print(i)\n"
"2002 # year\n"
"3 # month\n"
"11 # day\n"
"0\n"
"0\n"
"0\n"
"0 # weekday (0 = Monday)\n"
"70 # 70th day in the year\n"
"-1\n"
">>> ic = d.isocalendar()\n"
">>> for i in ic:\n"
"... print(i)\n"
"2002 # ISO year\n"
"11 # ISO week number\n"
"1 # ISO day number ( 1 = Monday )\n"
"\n"
">>> # A date object is immutable; all operations produce a new object\n"
">>> d.replace(year=2005)\n"
"datetime.date(2005, 3, 11)"
msgstr ""
">>> import datetime as dt\n"
">>> d = dt.date.fromordinal(730920) # 730920th day after 1. 1. 0001\n"
">>> d\n"
"datetime.date(2002, 3, 11)\n"
"\n"
">>> # Methods related to formatting string output\n"
">>> d.isoformat()\n"
"'2002-03-11'\n"
">>> d.strftime(\"%d/%m/%y\")\n"
"'11/03/02'\n"
">>> d.strftime(\"%A %d. %B %Y\")\n"
"'Monday 11. March 2002'\n"
">>> d.ctime()\n"
"'Mon Mar 11 00:00:00 2002'\n"
">>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, \"day\", \"month\")\n"
"'The day is 11, the month is March.'\n"
"\n"
">>> # Methods for extracting 'components' under different calendars\n"
">>> t = d.timetuple()\n"
">>> for i in t:\n"
"... print(i)\n"
"2002 # year\n"
"3 # month\n"
"11 # day\n"
"0\n"
"0\n"
"0\n"
"0 # weekday (0 = Monday)\n"
"70 # 70th day in the year\n"
"-1\n"
">>> ic = d.isocalendar()\n"
">>> for i in ic:\n"
"... print(i)\n"
"2002 # ISO year\n"
"11 # ISO week number\n"
"1 # ISO day number ( 1 = Monday )\n"
"\n"
">>> # A date object is immutable; all operations produce a new object\n"
">>> d.replace(year=2005)\n"
"datetime.date(2005, 3, 11)"
msgid ":class:`!datetime` objects"
msgstr "اشیاء :class:`!datetime`"
msgid "A :class:`.datetime` object is a single object containing all the information from a :class:`date` object and a :class:`.time` object."
msgstr "یک شیء :class:`.datetime`، یک شیء واحد است که شامل تمام اطلاعات یک شیء :class:`date` و یک شیء :class:`.time` میشود."