Skip to content

Commit a85589c

Browse files
committed
fix DateTime docstring
1 parent be7f809 commit a85589c

File tree

2 files changed

+63
-84
lines changed

2 files changed

+63
-84
lines changed

base/docs/helpdb.jl

+9-12
Original file line numberDiff line numberDiff line change
@@ -12072,8 +12072,7 @@ doc"""
1207212072
1207312073
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
1207412074
12075-
Construct a DateTime type by parts. Arguments must be convertible to
12076-
``Int64``.
12075+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
1207712076
1207812077
::
1207912078
@@ -12086,19 +12085,18 @@ DateTime parts not provided will default to the value of ``Dates.default(period)
1208612085
1208712086
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
1208812087
12089-
Create a DateTime through the adjuster API. The starting point will be constructed from the
12090-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
12091-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
12092-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
12093-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
12094-
is never satisfied).
12088+
Create a DateTime through the adjuster API. The starting point will be constructed from the
12089+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
12090+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
12091+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
12092+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
1209512093
1209612094
::
1209712095
1209812096
DateTime(dt::Date) -> DateTime
1209912097
12100-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
12101-
parts of the new ``DateTime`` are assumed to be zero.
12098+
Converts a ``Date`` type to a ``DateTime``.
12099+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
1210212100
1210312101
::
1210412102
@@ -12125,8 +12123,7 @@ Code Matches Comment
1212512123
=============== ========= ===============================================================
1212612124
1212712125
All characters not listed above are treated as delimiters between date and time slots.
12128-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
12129-
like "y-m-dTH:M:S.s".
12126+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
1213012127
1213112128
::
1213212129

doc/stdlib/dates.rst

+54-72
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
5555

5656
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
5757

58-
Construct a DateTime type by parts. Arguments must be convertible to
59-
``Int64``.
58+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
6059

6160
::
6261

@@ -69,19 +68,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
6968

7069
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
7170

72-
Create a DateTime through the adjuster API. The starting point will be constructed from the
73-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
74-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
75-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
76-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
77-
is never satisfied).
71+
Create a DateTime through the adjuster API. The starting point will be constructed from the
72+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
73+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
74+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
75+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
7876

7977
::
8078

8179
DateTime(dt::Date) -> DateTime
8280

83-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
84-
parts of the new ``DateTime`` are assumed to be zero.
81+
Converts a ``Date`` type to a ``DateTime``.
82+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
8583

8684
::
8785

@@ -108,8 +106,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
108106
=============== ========= ===============================================================
109107

110108
All characters not listed above are treated as delimiters between date and time slots.
111-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
112-
like "y-m-dTH:M:S.s".
109+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
113110

114111
::
115112

@@ -125,8 +122,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
125122

126123
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
127124

128-
Construct a DateTime type by parts. Arguments must be convertible to
129-
``Int64``.
125+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
130126

131127
::
132128

@@ -139,19 +135,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
139135

140136
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
141137

142-
Create a DateTime through the adjuster API. The starting point will be constructed from the
143-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
144-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
145-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
146-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
147-
is never satisfied).
138+
Create a DateTime through the adjuster API. The starting point will be constructed from the
139+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
140+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
141+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
142+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
148143

149144
::
150145

151146
DateTime(dt::Date) -> DateTime
152147

153-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
154-
parts of the new ``DateTime`` are assumed to be zero.
148+
Converts a ``Date`` type to a ``DateTime``.
149+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
155150

156151
::
157152

@@ -178,8 +173,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
178173
=============== ========= ===============================================================
179174

180175
All characters not listed above are treated as delimiters between date and time slots.
181-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
182-
like "y-m-dTH:M:S.s".
176+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
183177

184178
::
185179

@@ -195,8 +189,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
195189

196190
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
197191

198-
Construct a DateTime type by parts. Arguments must be convertible to
199-
``Int64``.
192+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
200193

201194
::
202195

@@ -209,19 +202,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
209202

210203
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
211204

212-
Create a DateTime through the adjuster API. The starting point will be constructed from the
213-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
214-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
215-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
216-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
217-
is never satisfied).
205+
Create a DateTime through the adjuster API. The starting point will be constructed from the
206+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
207+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
208+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
209+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
218210

219211
::
220212

221213
DateTime(dt::Date) -> DateTime
222214

223-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
224-
parts of the new ``DateTime`` are assumed to be zero.
215+
Converts a ``Date`` type to a ``DateTime``.
216+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
225217

226218
::
227219

@@ -248,8 +240,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
248240
=============== ========= ===============================================================
249241

250242
All characters not listed above are treated as delimiters between date and time slots.
251-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
252-
like "y-m-dTH:M:S.s".
243+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
253244

254245
::
255246

@@ -265,8 +256,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
265256

266257
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
267258

268-
Construct a DateTime type by parts. Arguments must be convertible to
269-
``Int64``.
259+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
270260

271261
::
272262

@@ -279,19 +269,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
279269

280270
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
281271

282-
Create a DateTime through the adjuster API. The starting point will be constructed from the
283-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
284-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
285-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
286-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
287-
is never satisfied).
272+
Create a DateTime through the adjuster API. The starting point will be constructed from the
273+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
274+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
275+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
276+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
288277

289278
::
290279

291280
DateTime(dt::Date) -> DateTime
292281

293-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
294-
parts of the new ``DateTime`` are assumed to be zero.
282+
Converts a ``Date`` type to a ``DateTime``.
283+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
295284

296285
::
297286

@@ -318,8 +307,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
318307
=============== ========= ===============================================================
319308

320309
All characters not listed above are treated as delimiters between date and time slots.
321-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
322-
like "y-m-dTH:M:S.s".
310+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
323311

324312
::
325313

@@ -335,8 +323,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
335323

336324
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
337325

338-
Construct a DateTime type by parts. Arguments must be convertible to
339-
``Int64``.
326+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
340327

341328
::
342329

@@ -349,19 +336,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
349336

350337
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
351338

352-
Create a DateTime through the adjuster API. The starting point will be constructed from the
353-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
354-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
355-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
356-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
357-
is never satisfied).
339+
Create a DateTime through the adjuster API. The starting point will be constructed from the
340+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
341+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
342+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
343+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
358344

359345
::
360346

361347
DateTime(dt::Date) -> DateTime
362348

363-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
364-
parts of the new ``DateTime`` are assumed to be zero.
349+
Converts a ``Date`` type to a ``DateTime``.
350+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
365351

366352
::
367353

@@ -388,8 +374,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
388374
=============== ========= ===============================================================
389375

390376
All characters not listed above are treated as delimiters between date and time slots.
391-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
392-
like "y-m-dTH:M:S.s".
377+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
393378

394379
::
395380

@@ -415,8 +400,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
415400

416401
DateTime(y, [m, d, h, mi, s, ms]) -> DateTime
417402

418-
Construct a DateTime type by parts. Arguments must be convertible to
419-
``Int64``.
403+
Construct a DateTime type by parts. Arguments must be convertible to ``Int64``.
420404

421405
::
422406

@@ -429,19 +413,18 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
429413

430414
DateTime(f::Function, y[, m, d, h, mi, s]; step=Day(1), negate=false, limit=10000) -> DateTime
431415

432-
Create a DateTime through the adjuster API. The starting point will be constructed from the
433-
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
434-
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
435-
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
436-
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function``
437-
is never satisfied).
416+
Create a DateTime through the adjuster API. The starting point will be constructed from the
417+
provided ``y, m, d...`` arguments, and will be adjusted until ``f::Function`` returns true. The step size in
418+
adjusting can be provided manually through the ``step`` keyword. If ``negate=true``, then the adjusting
419+
will stop when ``f::Function`` returns false instead of true. ``limit`` provides a limit to
420+
the max number of iterations the adjustment API will pursue before throwing an error (in the case that ``f::Function`` is never satisfied).
438421

439422
::
440423

441424
DateTime(dt::Date) -> DateTime
442425

443-
Converts a ``Date`` type to a ``DateTime``. The hour, minute, second, and millisecond
444-
parts of the new ``DateTime`` are assumed to be zero.
426+
Converts a ``Date`` type to a ``DateTime``.
427+
The hour, minute, second, and millisecond parts of the new ``DateTime`` are assumed to be zero.
445428

446429
::
447430

@@ -468,8 +451,7 @@ alternatively, you could call ``using Dates`` to bring all exported functions in
468451
=============== ========= ===============================================================
469452

470453
All characters not listed above are treated as delimiters between date and time slots.
471-
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string
472-
like "y-m-dTH:M:S.s".
454+
So a ``dt`` string of "1996-01-15T00:00:00.0" would have a ``format`` string like "y-m-dTH:M:S.s".
473455

474456
::
475457

0 commit comments

Comments
 (0)